ID: 50631 Updated by: ras...@php.net Reported By: barlow at fhtsolutions dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Linux or XP PHP Version: 5.2.12 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: ------------------------------------------------------------------------ [2010-01-02 06:04:30] barlow at fhtsolutions dot com Description: ------------ strtotime() reports an incorrect value for a particular date: 2010-03-15 It seems to think that this day has 23 hours! Reproduce code: --------------- --- >From manual page: function.strtotime#Description --- <?php $a = strtotime("2010-03-14"); $b = strtotime("2010-03-15"); echo "Number of hours difference: ".(($b-$a)/3600)."<br />"; // shows 23 ! WRONG! // PHP Version 5.2.12 ?> Expected result: ---------------- Number of hours difference: 24 Actual result: -------------- Number of hours difference: 23 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50631&edit=1