ID:               40202
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ajb at blyler dot cc
-Status:           Open
+Status:           Bogus
 Bug Type:         *General Issues
 Operating System: Linux
 PHP Version:      5.2.0
 New Comment:

I am aware that they are different, but we can not rely on the
/etc/localtime link, as that is something extremely distribution and OS
dependent. Now, in order for PHP to detect which timezone it is in, it
uses a few parameters: offset to GMT combined with DST, and the
abbreviation. At the moment, all of these parameters are the same for
both locations:

[EMAIL PROTECTED]:~$ TZ=America/Denver date +"%z %Z"
-0700 MST
[EMAIL PROTECTED]:~$ TZ=America/Phoenix date +"%z %Z"
-0700 MST

and then we just have to pick one.
Please remember, that making the setting is the correct way of doing
things. The detection is there just to take care of BC issues as much
as possible.


Previous Comments:
------------------------------------------------------------------------

[2007-01-23 14:15:41] ajb at blyler dot cc

Setting the time zone in the php.ini file works just fine.  

But why doesn't php detect that /etc/localtime is set to Arizona's time
zone?  I would think that php would detect Arizona's time zone as
America/Phoenix and not America/Denver.  Since these time zones are
different.

------------------------------------------------------------------------

[2007-01-23 08:15:27] [EMAIL PROTECTED]

So set the correct time zone in php.ini:
http://no.php.net/manual/en/ref.datetime.php#ini.date.timezone

------------------------------------------------------------------------

[2007-01-23 04:41:20] ajb at blyler dot cc

Description:
------------
When the timezone (/etc/localtime) is set to Arizona time a call to
date_default_timezone_get() returns America/Denver.

Which causes the date/time functions in php to incorrectly return
date/time data since Arizona does not observe daylight savings.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40202&edit=1

Reply via email to