note 41817 added to function.mktime

From: Date: Thu, 22 Apr 2004 21:27:51 +0000
Subject: note 41817 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-68560@lists.php.net to get a copy of this message
I noticed that while it is legal to do this: $date=date("Y-m-d", mktime(0,0,0,4,20,2004); It doesn't quite work the same when you do this: $time=date("H:i:s", mktime(10,30,15,0,0,0); No matter what variables you put in for time, it'll always spit out 15:59:59. You need to include the month, day and year if you want it to convert the time. I spent nearly an hour trying to figure out what I was doing wrong til I stuck in a random date. ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41817 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41817&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41817&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68560) next »