ID:               27970
 Updated by:       [EMAIL PROTECTED]
 Reported By:      crestien at bellsouth dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: Windows 2000 Server
 PHP Version:      4.3.5
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

(And this is also fixed)


Previous Comments:
------------------------------------------------------------------------

[2004-04-12 23:32:15] crestien at bellsouth dot net

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27970&edit=1

Reply via email to