ID: 33920
User updated by: php-work at yandex dot ru
Reported By: php-work at yandex dot ru
Status: Open
Bug Type: Date/time related
Operating System: Windows XP SP2
PHP Version: 5CVS-2005-07-29 (dev)
New Comment:
And else. I tried it (echo date('H');) on PHP5.0.4b3 and result is
true, 00....
Previous Comments:
------------------------------------------------------------------------
[2005-07-29 22:43:22] php-work at yandex dot ru
I has tried date_default_timezone_set('GMT'), but no result.
date_default_timezone_get return UTC. If add the
date_default_timezone_set('GMT'), return GMT.
Script:
<?php
date_default_timezone_set('GMT');
echo date_default_timezone_get();
echo date('H');
?>
print GMT20 (but current time - 00:42).
------------------------------------------------------------------------
[2005-07-29 20:00:43] [EMAIL PROTECTED]
Probably your TZ environment var is set to GMT.
So, you need to use the date_default_timezone_set() function to overide
it.
------------------------------------------------------------------------
[2005-07-29 19:22:54] php-work at yandex dot ru
Tried, no effect.
------------------------------------------------------------------------
[2005-07-29 18:14:20] [EMAIL PROTECTED]
Set the timezone in php.ini using date.timezone setting.
------------------------------------------------------------------------
[2005-07-29 16:37:50] php-work at yandex dot ru
Description:
------------
Code:
<?php
echo date("r");
?>
print Fri, 29 Jul 2005 14:22:56 +0000, but stated time zone:
(GMT+03:00) Moscow.
I tried to use other time zone, setlocale, but result is not changed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33920&edit=1