note 34430 added to function.mktime

From: Date: Sat, 26 Jul 2003 23:31:45 +0000
Subject: note 34430 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-52726@lists.php.net to get a copy of this message
I'm programing a software that depends on the current date, but since it is mostly used at night I had the problem that after midnight the date was the next day. So with this two simple lines y corrected it... if it is before 4am it changes the timespam to the day before (24*60*60=86400) $timestamp = mktime (0,0,0,date("m"),date("d"),date("Y")) if (date("H")<4) $timestamp -= 86400; ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34430 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34430&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34430&report=yes

« previous php.notes (#52726) next »