|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-13 03:12 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 05:00:01 2025 UTC |
Description: ------------ This error only came about in April. I've had it on my intranet for about a year now.. and all of a sudden I have two April 3rds on my Time Clock and it's consistent on matter what year it's on. I cleared it up by just adding an hour to the mktime() to force it further into the day. This is a very normal setup of PHP. It's the stable release of 4.3.5 and it's running IIS 5 as cgi per the auto installer The only changes in the php.ini is my doc_root to a separate drive and my extensions directory to c:\PHP. This also did it on my home computer running 4.3.5 as a module on Apache 1.3.29 on Windows XP. Reproduce code: --------------- //Bad Code for($i=1; $i<31; $i++) { $timestamp = mktime(0,0,0,4,$i,2004); echo date("F j", $timestamp)." - ".$timestamp."<br>"; } //Jimmy Rigged Code - **Added 1 hour** for($i=1; $i<31; $i++) { $timestamp = mktime(1,0,0,4,$i,2004); echo date("F j", $timestamp)." - ".$timestamp."<br>"; } Expected result: ---------------- April 1 - 1080802800 April 2 - 1080889200 April 3 - 1080975600 April 4 - 1081058400 April 5 - 1081144800 April 6 - 1081231200 . . etc Actual result: -------------- April 1 - 1080799200 April 2 - 1080885600 April 3 - 1080972000 April 3 - 1081054800 April 5 - 1081141200 April 6 - 1081227600 . . etc