I noticed that my local time was consistently behind by one hour if I set my timezone to "US/Eastern" or "America/New York" (e.g. 10:00am when it was really 11:00am). I could only obtain the proper time by setting the timezone to "Etc/GMT-4".

After upgrading from PHP 4.4.6 to 5.2.3, the problem went away. I understand that there are major difference with how timezones are handled in Drupal between php 4 & 5, so I presume there is a bug somewhere in the 4.x code.

CommentFileSizeAuthor
#4 Eastern-AustraliaTZ.png38.26 KBCheckeredFlag

Comments

killes@www.drop.org’s picture

How did you observe your local time in event.module?

CheckeredFlag’s picture

I observed the current local time from /admin/settings/date-time in the date format menus. As I experimented with different timezone values, I would note the effects in the menus further below.

killes@www.drop.org’s picture

Thanks.

What is displayed for the date format string depends on the server time. If the server time is not switched to DST then what you observered should happen.

However, when I change the "Default time zone" setting, the timestrings in the "date format" section don't change at all. Even if I set it to some TZ in Australia...

CheckeredFlag’s picture

StatusFileSize
new38.26 KB

Very interesting. The time strings continue to change to the local time of the default timezone I select. (See attached screenshot.)

Additionally, I had noticed that timestamps were off when comments were posted as well as the "Last updated" time on /admin/logs/updates after clicking "Check manually".

I should note, however, that I'm using Windows Server 2003 and IIS 6.0. I don't know that this factors in as long as php correctly interprets the proper time/zone. I have confirmed that the server does indeed have the correct time and timezone (i.e. "Eastern Daylight Time").

Here is the cygwin output for /usr/bin/date as well as php date() calls for both 4.4.6 and 5.2.3:

$ date
Wed Jul 25 11:09:31 EDT 2007

$ ./cli/php -v                                   
PHP 4.4.6 (cli) (built: Feb 28 2007 21:35:59)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

$ ./cli/php -r "print date('r T');"
Wed, 25 Jul 2007 10:56:49 -0400 Eastern Daylight Time

$ ./php -v
PHP 5.2.3 (cli) (built: May 31 2007 09:37:22) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

$ ./php -r "print date('r T');"
Wed, 25 Jul 2007 10:57:18 -0400 EDT

Also, I'm sure that phpinfo() also displayed the correct time and GMT offset at the bottom so it appears that php is handling times correctly. I would only see incorrect times in Drupal while using php 4.4.6. Now that I have upgraded to php 5.2.3, it is difficult for me to provide any additional info. I'm just hoping that this will help diagnosis if there is indeed a problem with the Event module's timezone processing.

killes@www.drop.org’s picture

Status: Active » Fixed

Since it is fixed for the bug submitter and I don't care for IIS, I mark this fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.