ID:               27327
 Updated by:       [EMAIL PROTECTED]
 Reported By:      timo at reflection-metal dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: Suse, RedHat, WinXP, W2K
 PHP Version:      4.3.4
 New Comment:

We are happy to tell you that you just discovered Daylight Savings
Time. For more information see:
http://webexhibits.org/daylightsaving/b.html
Instead of using mktime/date consider using gmmktime and gmdate which
do
not suffer from DST.




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

[2004-02-20 03:41:56] timo at reflection-metal dot de

Just found out that this bug is a problem with summer time conversion.
You could check out e.g. 2003-03-30...

In addition:

If you subtract 1 minute from '2004-03-28 03:00:00' it results in
'2004-03-28 03:59:00'

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

[2004-02-20 02:53:44] timo at reflection-metal dot de

Description:
------------
The mktime function gives strange results when adding something that
results between '2004-03-28 01:00:00' and '2004-03-28 01:01:00'.

Reproduce code:
---------------
$STTDate = strToTime('2004-03-28 00:30:00');



$StrangeDate = date('Y-m-d H:i:s',
mktime(date('H',$STTDate),date('i',$STTDate)+30,0,date('m',$STTDate),date('d',$STTDate),date('Y',$STTDate)));



Expected result:
----------------
2004-03-28 01:00:00

Actual result:
--------------
2004-03-28 03:00:00


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


-- 
Edit this bug report at http://bugs.php.net/?id=27327&edit=1

Reply via email to