note 109889 added to function.mktime

From: Date: Thu, 30 Aug 2012 22:15:15 +0000
Subject: note 109889 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-190285@lists.php.net to get a copy of this message
about tothpeter at fbi dot hu 20-Mar-2012 08:52 It happens on Win2003 server too, I think that it happens because '0' makes php thinks it's and octal, if you remove the '0' before all samples it works, like that: using on Win2003 with Apache $a=mktime(0,0,0,7,01,2012); echo date('Y-m-d',$a); // 2012-07-01 $a=mktime(0,0,0,8,01,2012); echo date('Y-m-d',$a); // 2011-12-01 WTF $a=mktime(0,0,0,9,01,2012); echo date('Y-m-d',$a); // 2011-12-01 WTF $a=mktime(0,0,0,10,01,2012); echo date('Y-m-d',$a); // 2012-10-01 $a=mktime(0,0,0,07,31,2012); echo date('Y-m-d',$a); // 2012-07-31 Output: 2012-07-01 2012-08-01 2012-09-01 2012-10-01 2012-07-31 ---- Server IP: 180.92.182.149 Probable Submitter: 187.75.228.107 ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- https://master.php.net/note/edit/109889 Del: integrated -- https://master.php.net/note/delete/109889/integrated Del: useless -- https://master.php.net/note/delete/109889/useless Del: bad code -- https://master.php.net/note/delete/109889/bad+code Del: spam -- https://master.php.net/note/delete/109889/spam Del: non-english -- https://master.php.net/note/delete/109889/non-english Del: in docs -- https://master.php.net/note/delete/109889/in+docs Del: other reasons-- https://master.php.net/note/delete/109889 Reject -- https://master.php.net/note/reject/109889 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#190285) next »