|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-01-08 21:14 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 06:00:02 2025 UTC |
Description: ------------ Bug in mktime function parameters. mktime function expects 7 numeric parameters. I?ve passed instead of 8 (whick is numeric) the value 08 (which is also numeric) but the shown result is completly unexpected. Example: <?php $intData = mktime(00,00,00,01,08,2010); echo date("d/m/Y H:i:s", $intData); ?> should print 08/01/2010 00:00:00 but is printing 31/12/2009 00:00:00. Note: the problem occurs only with day parameter. if I send 08 in the month parametes the result is right. Reproduce code: --------------- $intData = mktime(00,00,00,01,08,2010); echo date("d/m/Y H:i:s", $intData); Expected result: ---------------- 08/01/2010 00:00:00 Actual result: -------------- 31/12/2009 00:00:00