From:             dave at dtracorp dot com
Operating system: Fedora Core 5
PHP version:      5.2.1
PHP Bug Type:     Date/time related
Bug description:  daylight savings offset is incorrect

Description:
------------
the normal timestamp offset from gmt for melbourne, australia is 36 000
seconds. currently, the offset is 32 400 seconds, as we just clicked off
daylight savings time. so at midnight 2007/03/30 gmt, it should be 9am
2007/03/31.
The DateTime object is displaying the correct time, but the getOffset()
method is giving the incorrect offset. it should be returning 32 400, it is
incorrectly returning 36 000.

Reproduce code:
---------------
$gmtTz = new DateTimeZone("Europe/London");
$localTz = new DateTimeZone('Australia/Melbourne');

$gmtDt = new DateTime("now", $gmtTz);
$localDt = new DateTime("now", $localTz);

echo $localTz->getOffset($gmtDt);

Expected result:
----------------
32400

Actual result:
--------------
36000

-- 
Edit bug report at http://bugs.php.net/?id=40960&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40960&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40960&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40960&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40960&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40960&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40960&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40960&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40960&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40960&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40960&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40960&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40960&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40960&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40960&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40960&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40960&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40960&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40960&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40960&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40960&r=mysqlcfg

Reply via email to