|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-10-15 15:04 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 21 05:00:01 2025 UTC |
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