On a Win2k server, using a WAPP stack (Windows,Apache,PostgreSQL,PHP). Running a PHP web application. Also tested using PHP interactive console.
The datetime is reported correctly, but for some strange reason the timezone is reported incorrectly:
php -a
<?php
echo date('c');
2009-04-19T16:52:35-04:00
C:\WAPP\php>time /t
17:06
C:\WAPP\php>date /t
Sun 04/19/2009
The server's OS timezone is actually set to GMT-5. I used an (unofficial) DST fix and also tried to use php_timezonedb.dll extension, but the problem persists.
This server is also running other applications (not under my control), so I can't just change the time. I could also just temporarily set everyone to GMT-4 in the PHP application, but I feel that there should be a less hackish solution.
Does anyone have any suggestions, or can give a more in depth explanation of what is happening? I suspect that it has something to do with the recent changes in DST and Windows, and it is causing PHP to detect the timezone improperly.