#38174 [Bgs]: Date function error
| From: | hyve dot mind at gmail dot com | Date: | Fri, 21 Jul 2006 14:11:26 +0000 |
| Subject: | #38174 [Bgs]: Date function error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99711@lists.php.net to get a copy of this message | ||
ID: 38174
User updated by: hyve dot mind at gmail dot com
Reported By: hyve dot mind at gmail dot com
Status: Bogus
Bug Type: Date/time related
Operating System: Windows
PHP Version: 5CVS-2006-07-21 (snap)
New Comment:
I already use date_default_timezone_set and also set directly in
php.ini
but it only fix my timezone only and make other timezone crowd.
Previous Comments:
------------------------------------------------------------------------
[2006-07-21 13:09:42] derick@php.net
Asia/Krasnoyarsk is the guessed timezone as you didn't specify a
timezone in php.ini. If you want to see this different, you need to
make a setting in php.ini and pick one of the supported zones from the
documentation:
http://www.php.net/manual/en/timezones.asia.php
Instead of using php.ini you can also use the
date_default_timezone_set() function that you use, and set it to the
one from the list in the manual that matches your location the best.
------------------------------------------------------------------------
[2006-07-21 12:09:40] hyve dot mind at gmail dot com
Description:
------------
the date function return error.
My timezone is GMT +7 bangkok, hanoi, jakarta.
When i view phpinfo(). the Default timezone is correct GMT+7, but in
different city "Asia/Krasnoyarsk".
When i use date("Y-m-d H:i:s");
it return 1 hour a head
When i use date("O");
it return 8
but when i use gmdate("Y-m-d H:i:s");
it return correct time. 7hour before my time.
I already use date_default_timezone_set and also set directly in
php.ini
but it only fix my timezone only and make other timezone crowd.
Reproduce code:
---------------
date("Y-m-d H:i:s");
Expected result:
----------------
return correct date time
and add more timezone in phpinfo "Asia/bangkok, hanoi, jakarta"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38174&edit=1