note 34430 deleted from function.mktime by sniper
| From: | sniper@php.net | Date: | Tue, 04 Nov 2003 13:10:09 +0000 |
| Subject: | note 34430 deleted from function.mktime by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59866@lists.php.net to get a copy of this message | ||
Note Submitter: ahfuenza@ing.puc.cl
----
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;