#38586 [Opn->Bgs]: mktime has some problem for some day.

From: Date: Fri, 25 Aug 2006 07:12:11 +0000
Subject: #38586 [Opn->Bgs]: mktime has some problem for some day.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-101309@lists.php.net to get a copy of this message
ID: 38586 Updated by: derick@php.net Reported By: ziyunxiao at gmail dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: WiNXP PHP Version: 5.1.5 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-08-25 00:01:35] ziyunxiao at gmail dot com Description: ------------ day Oct 30 has 90000 seconds a day. I only test year 2005,2006,2007 in Version is php 5.1.4 and 5.1.6. I didn't install 5.1.5. the result is right on php 4.4.3 Reproduce code: --------------- <? $st=mktime(0, 0, 0, 10, 30,2007); $st1=mktime(0, 0, 0, 10, 31,2007); echo "seconds:".($st1 - $st)."<br>"; ?> Expected result: ---------------- seconds:86400 Actual result: -------------- seconds:90000 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38586&edit=1

« previous php.bugs (#101309) next »