note 70988 added to function.mktime
| From: | jsebfranck at osu1 dot php dot net | Date: | Tue, 07 Nov 2006 12:42:14 +0000 |
| Subject: | note 70988 added to function.mktime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119471@lists.php.net to get a copy of this message | ||
There are several notes for mktime which use the number 86400 to differentiate two days. However
this technique may pose a problem in case there is a day where the hour change between the two dates
to compare.
Consequently, if you want the timestamp difference between the day where the hour change and the
next day, it will not be equals to 86400 but either 82800 in case its the winter change of hour day
or 90000 for the summer change of hour day.
For example in 2006 :
<?php
echo mktime(0,0,0,10,29,2006) - mktime(0,0,0,10,30,2006); // -90 000
?>
----
Server IP: 195.221.21.36
Probable Submitter: 62.23.212.170 (proxied: 1.1 netcache-ill (NetCache NetApp/5.5R5D5))
----
Manual Page -- http://www.php.net/manual/en/function.mktime.php
Edit -- https://master.php.net/note/edit/70988
Del: integrated -- https://master.php.net/note/delete/70988/integrated
Del: useless -- https://master.php.net/note/delete/70988/useless
Del: bad code -- https://master.php.net/note/delete/70988/bad+code
Del: spam -- https://master.php.net/note/delete/70988/spam
Del: non-english -- https://master.php.net/note/delete/70988/non-english
Del: in docs -- https://master.php.net/note/delete/70988/in+docs
Del: other reasons-- https://master.php.net/note/delete/70988
Reject -- https://master.php.net/note/reject/70988
Search -- https://master.php.net/manage/user-notes.php