ID:               33871
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jeremy at techtrav dot com
-Status:           Assigned
+Status:           Feedback
 Bug Type:         Date/time related
 Operating System: Windows XP Apache 2
 PHP Version:      5.1.0b3
 Assigned To:      derick
 New Comment:

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...


Previous Comments:
------------------------------------------------------------------------

[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...

------------------------------------------------------------------------

[2005-08-04 16:51:34] jeremy at techtrav dot com

I tried adding that line to the top of my code.  I am not familar with
that function nor do I find it in the documentation.  I get a fatal
error:
Fatal error: Call to undefined function date_default_timezone_set() 

when I run this script:
date_default_timezone_set("America/New_York");
echo date('r', (strtotime('oct 25')+(86400*6)));

I would agree with you in your conclusion though that it would appear
that PHP 5.1.X is not reading the timezone of the local machine.

------------------------------------------------------------------------

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

Reply via email to