|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-05-07 04:23 UTC] derick@php.net
[2001-08-31 12:06 UTC] sander@php.net
[2001-08-31 14:05 UTC] schnitten at gmx dot at
[2001-08-31 14:48 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 15:00:01 2025 UTC |
first of all: I use php 4.0.1pl2 and don't have the possibility to upgrade. Please verify with latest version. I tried to add 12 months to a given timestamp and figured out that mktime() doesn't include a 29th February into its calculations. Effect is, that following code doesn't jump forward 1 year during each loop. Every leap year 1 day gets lost! $a = mktime(0,0,0,1,1,1970); for ($i=0; $i<20; $i++) { $a = mktime(0,0,3600 +$a,1+12,1,1970); $b = date("d-m-Y", $a); print "Date: $b<br>"; }