note 22501 deleted from function.mktime by sniper
| From: | sniper@php.net | Date: | Tue, 04 Nov 2003 13:11:44 +0000 |
| Subject: | note 22501 deleted from function.mktime by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59882@lists.php.net to get a copy of this message | ||
Note Submitter: admin@jamuk.com
----
Be careful when using mktime with the date function to create past and future dates in countries
where the clocks adjust for daylight savings time.
All the examples here use mktime ( 0,0,0, ... which will give you problems as daylight savings time
goes out of effect.
If you now use date("M-d-Y", mktime ( 0,0,0, ... in a loop to generate days over a period
where the clock goes back an hour, you will generate that date twice!
Avoid this by creating days at lunchtime rather than midnight with mktime ( 11,0,0, ...