note 41356 added to function.mktime

From: Date: Wed, 07 Apr 2004 11:57:02 +0000
Subject: note 41356 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-67763@lists.php.net to get a copy of this message
ok i had a problem with a date is retrieved from a cookie. the cookie was named 'weergavedatum' and gave me eg. 2004-04-06. Now when a user selected hour 24 (in a dropdown-box r something) i wanted the date to change to 2004-04-07 (this didn't work with strtotime) **$tilluur and $tillmin hold the selected hour and the selected minutes** if ($tilluur==24) { $tilluur='00'; $year=substr($weergavedatum,0,4); $month=substr($weergavedatum,5,2); $day=substr($weergavedatum,8,2); $tussendatum= mktime ($tilluur,$tillmin,00,$month,$day+1,$year); $pdtill= date('Y-m-d H:i',$tussendatum); } ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41356 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41356&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41356&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67763) next »