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

eean’s picture

It 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);

eean’s picture

It 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);

eean’s picture

It 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);

eean’s picture

It 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);

Kardboard’s picture

OK, 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.

RayBowers’s picture

Has 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

crunchywelch’s picture

4.5 issue, timezones redone in 4.6

crunchywelch’s picture