|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-10-18 20:56 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 17:00:01 2025 UTC |
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 )