#43025 [Opn->Bgs]: PHP does not detect daylight saving
| From: | derick@php.net | Date: | Thu, 18 Oct 2007 20:56:16 +0000 |
| Subject: | #43025 [Opn->Bgs]: PHP does not detect daylight saving | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-118689@lists.php.net to get a copy of this message | ||
ID: 43025
Updated by: derick@php.net
Reported By: maximo at granweb dot net
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Linux
PHP Version: 5.2.4
New Comment:
Please install http://pecl.php.net/package/timezonedb which has
an
updated database.
Previous Comments:
------------------------------------------------------------------------
[2007-10-18 20:47:07] maximo at granweb dot net
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 this bug report at http://bugs.php.net/?id=43025&edit=1