|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-05 05:14 UTC] sander@php.net
[2002-04-05 15:18 UTC] sander@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 19:00:02 2025 UTC |
for ($i = 0 ; $i< 365; $i++){ $date = mktime(0,0,0,1,$i,2001); $date1 = mktime(0,0,0,1,$i-1,2001); if (($date - $date1 ) /3600 <> 24){ echo "<br>" .date("Y m d", $date1) . " "; echo ($date - $date1 ) /3600 ." h";} } It is not explicite that the mktime function take into account the change of hour some day in the year. The consequence is that (a date return by mktime )- 86400 is not always the day before.