#46302 [NEW]: Timezone PHP Don't show the correct time

From: Date: Wed, 15 Oct 2008 14:56:35 +0000
Subject: #46302 [NEW]: Timezone PHP Don't show the correct time
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-129718@lists.php.net to get a copy of this message
From: mfpjr at globo dot com Operating system: RHEL AS 4.7 PHP version: 5.2.6 PHP Bug Type: Date/time related Bug description: Timezone PHP Don't show the correct time Description: ------------ Hi, the php show incorrect time, i reproduce the error below: [root@whisper ~]# php -version PHP 5.2.6 (cli) (built: Oct 15 2008 11:14:30) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies [root@whisper ~]# date Qua Out 15 11:48:24 BRT 2008 [root@whisper ~]# date -u Qua Out 15 14:48:27 UTC 2008 [root@whisper ~]# echo $TZ America/Sao_Paulo [root@whisper ~]# php -r "print date('d/m/Y H:i:s e T');" 15/10/2008 12:48:41 America/Sao_Paulo BRST Here is my date info in PHPINFO: date/time support enabled "Olson" Timezone Database Version 2008.2 Timezone Database internal Default timezone America/Sao_Paulo Directive Local Value Master Value date.default_latitude 31.7667 31.7667 date.default_longitude 35.2333 35.2333 date.sunrise_zenith 90.583333 90.583333 date.sunset_zenith 90.583333 90.583333 date.timezone America/Sao_Paulo America/Sao_Paulo i try to change the date.timzone setting in php.ini but when I test with the command above the Timezone Setting don't change. Reproduce code: --------------- php -r "print date('d/m/Y H:i:s e T');" Expected result: ---------------- Same time from server, the php enable the Daylight Saving Time before OS. Actual result: -------------- [root@whisper ~]# php -r "print date('d/m/Y H:i:s e T');" 15/10/2008 12:48:41 America/Sao_Paulo BRST -- Edit bug report at http://bugs.php.net/?id=46302&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46302&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46302&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46302&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46302&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46302&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46302&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46302&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46302&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46302&r=support Expected behavior: http://bugs.php.net/fix.php?id=46302&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46302&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46302&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46302&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46302&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46302&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46302&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46302&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46302&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46302&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46302&r=mysqlcfg

« previous php.bugs (#129718) next »