#34710 [Fbk->Bgs]: Etc/GMT+/- timezones display incorrect time with date_default_timezone_set
| From: | derick@php.net | Date: | Mon, 03 Oct 2005 06:07:33 +0000 |
| Subject: | #34710 [Fbk->Bgs]: Etc/GMT+/- timezones display incorrect time with date_default_timezone_set | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-85905@lists.php.net to get a copy of this message | ||
ID: 34710
Updated by: derick@php.net
Reported By: rcronin at gmail dot com
-Status: Feedback
+Status: Bogus
Bug Type: Date/time related
Operating System: CentOS 4
PHP Version: 5.1.0RC1
New Comment:
This is not a bug, for some reason the Etc/GMT<x> timezones implement
the GMT offset the "wrong way". See here what my OS does by default:
derick@kossu:~$ date
Mon Oct 3 08:05:29 CEST 2005
derick@kossu:~$ export TZ=Etc/GMT+9
derick@kossu:~$ date
Sun Oct 2 21:05:36 GMT+9 2005
derick@kossu:~$ export TZ=Etc/GMT-9
derick@kossu:~$ date
Mon Oct 3 15:06:44 GMT-9 2005
I would really recommend NOT to use those though, but rather use
"Asia/Tokyo".
Previous Comments:
------------------------------------------------------------------------
[2005-10-03 07:09:10] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-10-03 04:35:44] rcronin at gmail dot com
Description:
------------
All the Etc/GMT+/- timezones display incorrect times. Example, when
Asia/Tokyo is entered as the time zone the correc time is displayed,
Tokyo is GMT+9. When Etc/GMT+9 is entered for the time zone the time is
incorrect. Output example:
GMT: 10/03/05 02:28 AM
GMT+9 (Asia/Tokyo): 10/03/05 11:28 AM (correct)
GMT+9 (Etc/GMT+9): 10/02/05 05:28 PM
The same occures for all the Etc timezone inputs except the GMT+0
zones.
I am running CentOS 4 with PHP5.1.0RC1. date.timezone is set to
Etc/UTC, as is the server. Server clock is kept in UTC.
Reproduce code:
---------------
http://www.xotion.com/settings/
Expected result:
----------------
Time output is correct for specified time zone.
Actual result:
--------------
Time output is correct only for non-Etc time zones and
GMT+0/GMT-0/UTC/Universal.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34710&edit=1