Closed (won't fix)
Project:
Event
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2004 at 19:05 UTC
Updated:
24 May 2005 at 02:41 UTC
Still getting a time bug on editing an event: When I load the event, the time field shows the correct local time, but if that is saved, the time is off-set by the site time zone.
event time: 11:00
becomes
event time: 7:00
I have to set the time in GMT to have it display correctly on the public pages. This is using the CVS current as of today at about noon.
Comments
Comment #1
eean commentedIt was showing the correct times, but it was incorrect about the minutesleft. I did the following to event.module and it started being correct.
if (variable_get('event_timezone', '1')) {
# $starttime -= $user->timezone;
}
else {
# $timezone = variable_get('date_default_timezone', 0);
# $starttime -= $timezone;
}
$minutesleft = floor(($starttime - time()) / 60);
Comment #2
eean commentedIt was showing the correct times, but it was incorrect about the minutesleft. I did the following to event.module and it started being correct.
if (variable_get('event_timezone', '1')) {
# $starttime -= $user->timezone;
}
else {
# $timezone = variable_get('date_default_timezone', 0);
# $starttime -= $timezone;
}
$minutesleft = floor(($starttime - time()) / 60);
Comment #3
eean commentedIt was showing the correct times, but it was incorrect about the minutesleft. I did the following to event.module and it started being correct.
if (variable_get('event_timezone', '1')) {
# $starttime -= $user->timezone;
}
else {
# $timezone = variable_get('date_default_timezone', 0);
# $starttime -= $timezone;
}
$minutesleft = floor(($starttime - time()) / 60);
Comment #4
eean commentedIt was showing the correct times, but it was incorrect about the minutesleft. I did the following to event.module and it started being correct.
if (variable_get('event_timezone', '1')) {
# $starttime -= $user->timezone;
}
else {
# $timezone = variable_get('date_default_timezone', 0);
# $starttime -= $timezone;
}
$minutesleft = floor(($starttime - time()) / 60);
Comment #5
Kardboard commentedOK, I'm not sure if this is the same issue, but my calendar thinks that the current time is 7 hours ahead of what it actually is. I don't have any bugs when it comes to adding events, and changing timezones and stuff don't help.
Site is at www.cass.ubc.ca and I'm in the GMT-8 timezone locally, however the server is GMT-5.
Comment #6
RayBowers commentedHas anyone figured this one out? Not just the time left part, but the whole issue around things being off by your displacement from GMT? I enter an event as 1930 (7:30pm) and when I save and view, it comes up at 3:30pm. If I edit the item again, say to update the description, the time is updated again and occurs in the morning now...
I'm still learning my way around Drupal and PHP, otherwise I would offer to debug and submit a fix. Who knows though, maybe I will give it a try, how hard can it be?
-Ray
Comment #7
crunchywelch commented4.5 issue, timezones redone in 4.6
Comment #8
crunchywelch commented