#37093 [NEW]: Daylight Savings Time error

From: Date: Sat, 15 Apr 2006 23:28:04 +0000
Subject: #37093 [NEW]: Daylight Savings Time error
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95843@lists.php.net to get a copy of this message
From:             robertsaenz at gmail dot com
Operating system: Windows XP Professional
PHP version:      5.1.2
PHP Bug Type:     Date/time related
Bug description:  Daylight Savings Time error

Description:
------------
The time returned from the date() function is incorrect.  The time is an
hour behind what it actually should be.  This occured after the clocks
were set forward an hour.  The timezone is: MST and I am in DST territory.
 The code should explain my problem better.  My server is set to use DST
and now since our clocks have been set forward (as mentioned before) I've
been getting that hour time difference.  My work around for now is to set
the server's clock an hour ahead which outputs the expected result,
however this is not what I want to do.  Is there maybe a work around for
this.  I searched the bugs but didn't find anything that lead to the exact
problem I had, but if there is a duplicate I apologize and if you can point
me to it that would be great. Thanks.

Reproduce code:
---------------
<?php
  echo date("Y-m-d H:i:s T I");
?>


Expected result:
----------------
2006-04-15 17:19:55 MST 0

Actual result:
--------------
2006-04-15 16:19:55 MST 0

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


Thread (8 messages)

« previous php.bugs (#95843) next »