ID: 41869
Updated by: [EMAIL PROTECTED]
Reported By: gnupun at yahoo dot com
-Status: Open
+Status: Assigned
Bug Type: Date/time related
Operating System: windows xp
PHP Version: 5.2.3
-Assigned To:
+Assigned To: derick
New Comment:
Derick, looks like the timezone DB needs an update.
Previous Comments:
------------------------------------------------------------------------
[2007-07-02 07:44:57] gnupun at yahoo dot com
Description:
------------
PHP returns incorrect time for the following timezones:
America/Port-au-Prince
Etc/GMT+*
Etc/GMT-*
where * is a digit 1-9.
Eg: Etc/GMT+1 returns time 1 hour before Etc/GMT
Similarly, Etc/GMT-1 returns time 1 hour after Etc/GMT
Reproduce code:
---------------
function print_current_time($timezone) {
date_default_timezone_set($timezone);
$s = strftime("%I:%M:%S %p %d %B %Y");
printf("%20s: %s\n", $timezone, $s);
}
print_current_time('America/Port-au-Prince');
print_current_time('Etc/GMT');
print_current_time('Etc/GMT+1');
print_current_time('Etc/GMT-1');
Expected result:
----------------
America/Port-au-Prince: 02:36:53 AM 02 July 2007
Etc/GMT: 07:36:53 AM 02 July 2007
Etc/GMT+1: 08:36:53 AM 02 July 2007
Etc/GMT-1: 06:36:53 AM 02 July 2007
Actual result:
--------------
America/Port-au-Prince: 03:36:53 AM 02 July 2007
Etc/GMT: 07:36:53 AM 02 July 2007
Etc/GMT+1: 06:36:53 AM 02 July 2007
Etc/GMT-1: 08:36:53 AM 02 July 2007
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41869&edit=1