ID:               38754
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mrobertson at hotmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: Mac OS X 10.4.7
 PHP Version:      5.1.6
 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:
------------------------------------------------------------------------

[2006-09-08 19:44:06] mrobertson at hotmail dot com

Description:
------------
There seems to be a 1 minute (3600 second) error in mktime

Reproduce code:
---------------
$onedayinsecs = 86400;
$timeS = mktime(0, 0, 0, 3, 26, 2006);
$timeS = $timeS + $onedayinsecs;
$dayS = mktime(0, 0, 0, 3, 27, 2006);
echo($timeS." - ".$dayS."<br/>");

Expected result:
----------------
The two values should be the same since we are adding 1 day in 
seconds to mktime value of 3/26/06 and getting the mktime 
value of 3/27/06.

Actual result:
--------------
1143417600 - 1143414000

The difference is 3600. Note if you start at 1/1/06 and go 
through all the days in the year totalling seconds in 
comparison to mktime this error exists between
3/27/06 and 10/29/06. From 30/10/06 the error corrects itself.


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


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

Reply via email to