From: maximo at granweb dot net
Operating system: Linux
PHP version: 5.2.4
PHP Bug Type: Date/time related
Bug description: PHP does not detect daylight saving
Description:
------------
I have 4 servers all of then are setup to a time zone with daylight saving
and I can see that on console but php says the server is not in daylight
saving time.
If I execute the command (date +"%z %Z") I get the result "-0200 BRST" and
thats right because we are currently on daylight saving time what make my
time zone pass from "-0300" to "-0200" but PHP doesn't see that and that
happen on all my linux servers.
Reproduce code:
---------------
echo date_default_timezone_get() . "<br>";
echo date("d.m.y H:i I T") . "<br>";
$localtime_assoc = localtime(time(), true);
print_r($localtime_assoc);
Expected result:
----------------
America/Sao_Paulo
18.10.07 17:39 1 BRST
Array ( [tm_sec] => 53 [tm_min] => 39 [tm_hour] => 17 [tm_mday] => 18
[tm_mon] => 9 [tm_year] => 107 [tm_wday] => 4 [tm_yday] => 290 [tm_isdst]
=> 1 )
Actual result:
--------------
America/Sao_Paulo
18.10.07 17:39 0 BRT
Array ( [tm_sec] => 53 [tm_min] => 39 [tm_hour] => 17 [tm_mday] => 18
[tm_mon] => 9 [tm_year] => 107 [tm_wday] => 4 [tm_yday] => 290 [tm_isdst]
=> 0 )
--
Edit bug report at http://bugs.php.net/?id=43025&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43025&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43025&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43025&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43025&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43025&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43025&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43025&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43025&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43025&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43025&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43025&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43025&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43025&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43025&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43025&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43025&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43025&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43025&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43025&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43025&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43025&r=mysqlcfg