php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34147 Timezone problem
Submitted: 2005-08-16 10:07 UTC Modified: 2006-01-02 08:55 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:2 (40.0%)
From: joerg dot klein at ifsam dot lu Assigned:
Status: Closed Package: Date/time related
PHP Version: 5.1.0b3 OS: win2000
Private report: No CVE-ID: None
 [2005-08-16 10:07 UTC] joerg dot klein at ifsam dot lu
Description:
------------
hi
It seems that php don't have the correct timezone. This error occurs since 5.1.0b3.

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

My box runs on win2000SP4.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-16 12:16 UTC] joerg dot klein at ifsam dot lu
same results with the latest snapshot
 [2005-08-16 12:17 UTC] tony2001@php.net
Derick, please check it out.
 [2005-08-16 13:17 UTC] derick@php.net
Duplicate of #33920
 [2005-08-16 13:47 UTC] joerg dot klein at ifsam dot lu
This behaviour occurs the first time in 5.1.0b3.
The time was always displayed correct in any previous PHP version! So why should the behaviour change in the latest beta version?
 [2005-08-16 14:00 UTC] derick@php.net
We've new date/time support that doesn't rely on the OS. If you can point us how to retrieve the current timezone abbreviation on Windows with threadsafe code, we're happy to add it.
 [2005-08-18 15:58 UTC] pash_ka at fonbet dot info
Please, add "date.timezone" setting to php.ini-dist and php.ini-recomended in Windows distribution, since it's very important to all peoples performing updates to PHP 5.1 not to forget set this value properly.
 [2005-08-19 12:54 UTC] derick@php.net
@pash_ka at fonbet dot info: What should we set it to by default?
 [2005-08-28 13:58 UTC] studio at peptolab dot com
I'm getting the same behaviour in RH FC4 - I created an RPM of 
5.1.0RC1 and installed that - despite being in the Australia/
Melbourne timezone, I'm automatically assumed to be America/
New_York by PHP. It seems the 'magic' method isn't correctly 
picking up my OS settings.
 [2005-08-30 09:16 UTC] derick@php.net
@studio at peptolab dot com: That's because the timezone abbreviations are ambigious. EST is both America/New_York and Australia/Melbourne. The magic method only sees the EST, so it needs to make an assumption. Set the config param in php.ini to "America/Melbourne" and all will be well.
 [2005-09-13 04:02 UTC] studio at peptolab dot com
Derick - we're AUSTRALIA/Melbourne ;) BTW, we don't use EST, 
we're on AEST

I did manually set the propert in php.ini and it works fine - 
it's just good to flag this for first-time users so they don't 
get a shock when they're testing the upgrade.
 [2006-01-02 08:55 UTC] sniper@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 16 03:00:03 2025 UTC