ID: 33871
Comment by: joerg dot klein at ifsam dot lu
Reported By: jeremy at techtrav dot com
Status: Feedback
Bug Type: Date/time related
Operating System: Windows XP Apache 2
PHP Version: 5.1.0b3
Assigned To: derick
New Comment:
hi
it seems that I have a related problem:
I am on GMT+1
for the following example the system time is 11:00
date("H:i");
=> 09:00
set system time-zone to GMT(+0)
date("H:i");
=> 09:00
set system time to 10:00
date("H:i");
=> 08:00
It seems that php don't have the correct timezone. This error occurs
since 5.1.0b3.
My box runs on win2000SP4 with the latest snapshot.
Previous Comments:
------------------------------------------------------------------------
[2005-08-05 12:53:27] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Sorry, but I've tested on windows and it works perfectly. Are you sure
you are using an up-to-date snapshot? And that means PHP 5.1.0 beta 3
is old...
------------------------------------------------------------------------
[2005-08-04 17:01:09] jeremy at techtrav dot com
By the way I do have E_ALL turned on, on my machine. After all I don't
run my windows box with PHP in production. I use my windows box for
development. Our PHP production runs on OpenBSD servers.
I don't quite understand this comment of yours:
"Now, if we can find a way how PHP can guess the correct timezone from
your windows box "
PHP 5.0.4 reads my TZ perfectly and gives you the expected result. Why
would PHP 5.1.X not be able to?
------------------------------------------------------------------------
[2005-08-04 16:55:55] jeremy at techtrav dot com
okay I figured out how to set my time zone.
I ran the following code in PHP 5.0.4 and PHP 5.1.X and recieved the
same result
putenv("TZ=US/Central");
echo date('r', (strtotime('oct 25')+(86400*6)));
This would mean the bug is simply that PHP5.1.X is not looking at the
time zone on the local machine.
------------------------------------------------------------------------
[2005-08-04 16:54:58] [EMAIL PROTECTED]
That function is only there in the snapshots, please try that instead.
http://snaps.php.net (and pick latest cvs (5.1-dev) there).
------------------------------------------------------------------------
[2005-08-04 16:53:03] [EMAIL PROTECTED]
Now, if we can find a way how PHP can guess the correct timezone from
your windows box (like it can do on most unices) that would be nice -
but I think it's quite impossible.
BTW, if you use error_reporting(E_ALL) you'd have gotten a warning
about this...
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/33871
--
Edit this bug report at http://bugs.php.net/?id=33871&edit=1