ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> phpdoc
phpdoc
[PHP-DOC] #34675 [Opn]: Date() is habitually 8 hours exactly behind current system time (Win XP)
by Ryan_huff At Knl Dot Cc other posts by this author
Sep 29 2005 5:10AM messages near this date
[PHP-DOC] #34675 [Opn]: Date() is habitually 8 hours exactly behind current system time (Win XP) | [PHP-DOC] #34627 [Asn->Opn]: fopen('php://stdout') / fputs() doesn't send output under Apache2 SAPI
ID:               34675
 User updated by:  ryan_huff at knl dot cc
 Reported By:      ryan_huff at knl dot cc
 Status:           Open
 Bug Type:         Documentation problem
 Operating System: Windows XP HOME
 PHP Version:      5.1.0RC1
 New Comment:

Was this a change from php 5.0.5 - 5.1?  Because even the recommended
.ini in the 5.0.5 package makes no mention of date.timezone, thats a
new on me.  Thanks a bunch!


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

[2005-09-29 13:42:39] derick@[...].net

That will be addressed in the documentation very soon. It depends on
which area you are exactly in, for now pick one from the list here:
http://viewcvs.php.net/viewcvs.cgi/php-src/ext/date/lib/timezonedb.h?rev=1.4.2.2&content-typ
e=text/vnd.viewcvs-markup

date.timezone=America/New_York is how you put it into php.ini

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

[2005-09-29 13:32:22] ryan_huff at knl dot cc

Okay, I updated to the newest CSV and switched the .ini out as
suggested. 

I am having an issue with date.timezone though,  I'm in GMT -05:00
Eastern Time (US & Canada) however, I have not found any docs that tell
me what format I need to use for date.timezone,  do I use quotes, how do
I format the directive?

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

[2005-09-29 09:17:50] derick@[...].net

You see a warning if you enable E_STRICT mode btw.

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

[2005-09-29 09:16:06] sniper@[...].net

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

And also: What timezone are you on? Use the "date.timezone" php.ini
setting to set it to the right place. For example I use this:
date.timezone="Europe/Helsinki"

Please also use the new php.ini-dist (or php.ini-recommended) as base
for your php.ini, it has changed a lot.


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

[2005-09-29 05:39:07] ryan_huff at knl dot cc

Description:
------------
On Windows XP Home which is the only system I have tried this issue on,
using the date(); function to return system time produces a result that
is always 8 hours exactly behind the current system time.

I have verified that the following is true;

1: Y2K Compliance is turned " On " in php.ini
2: The systems time is correct and in the correct time zone
3: The system is using daylight savings time

I have repeated this error consistantly using several variations of
format characters.

The ability to return the correct date however, seems unaffected.

This issue does not occur on my other Windows XP Home system, using PHP
5.4.3 & the same PHP.ini config and the same script.

Reproduce code:
---------------
variation 1.)  date("H:i:s");

variation 2.)  date("h:i:s");

variation 3.)  date("h:i");

variation 4.)  date("g:i");

Expected result:
----------------
I expect to see a verbos system time from php however, the result is
consistantly 8 hours behind the system time

Actual result:
--------------
if the current system time is 11:32 pm, PHP 5.1RC1 will render 03:32 pm
using any number of format character variations.


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


-- 
Edit this bug report at http://bugs.php.net/?id=34675&edit=1
Thread:
derick
Ryan_huff At Knl Dot Cc

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved