#39248 [NEW]: strftime("%z") inconsistant in non-GMT zones.
| From: | Lhunath at Pandora dot Be | Date: | Tue, 24 Oct 2006 18:53:31 +0000 |
| Subject: | #39248 [NEW]: strftime("%z") inconsistant in non-GMT zones. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-103947@lists.php.net to get a copy of this message | ||
From: Lhunath at Pandora dot Be
Operating system: Gentoo Linux 2.6.18
PHP version: 5.1.6
PHP Bug Type: Date/time related
Bug description: strftime("%z") inconsistant in non-GMT zones.
Description:
------------
The time zone used to generate formatted time from a timestamp changes
depending on the timestamp itself, unless if the timezone is set to GMT.
Reproduce code:
---------------
date_default_timezone_set("Europe/Brussels");
$time=1162072800;
print(strftime("%c %z", $time))."\n";
$time+=86400;
print(strftime("%c %z", $time))."\n";
Expected result:
----------------
The two lines should reflect a time with 24 hours difference. Both lines
should display the time as defined by the selected timezone (Which in the
example code is 'Europe/Brussels', which is +0100).
Actual result:
--------------
The two lines reflect a time with 24 hours difference, but they are
formatted in different time zones. The first is obviously not in the
correct timezone ('Europe/Brussels'), even though the timezone was set
correctly.
Sun Oct 29 00:00:00 2006 +0200
Sun Oct 29 23:00:00 2006 +0100
--
Edit bug report at http://bugs.php.net/?id=39248&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39248&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39248&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39248&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39248&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39248&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39248&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39248&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39248&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39248&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39248&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39248&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39248&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39248&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39248&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39248&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39248&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39248&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39248&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39248&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39248&r=mysqlcfg