Bug #13331: bad results of "getdate()" function

From: Date: Sun, 16 Sep 2001 19:17:15 +0000
Subject: Bug #13331: bad results of "getdate()" function
Groups: php.dev 
Request: Send a blank email to php-dev+get-66054@lists.php.net to get a copy of this message
From: miran@centrum.cz Operating system: win2k PHP version: 4.0.6 PHP Bug Type: Date/time related Bug description: bad results of "getdate()" function Hi, I found some bug in function getdate() - it returns bad results - from two different times (1035680400 and 1035676800) returns function "getdate(int fromTime)" same results, but it shouldn't (of course) :( try this piece of code: <? $date_one = getdate(1035680400); echo "1035680400 =>"; print_r($date_one); echo "<br>1035676800 =>"; $date_two = getdate(1035676800); print_r($date_two); ?> it products this output: 1035680400 =>Array ( [seconds] => 0 [minutes] => 0 [hours] => 2 [mday] => 27 [wday] => 0 [mon] => 10 [year] => 2002 [yday] => 299 [weekday] => Sunday [month] => October [0] => 1035680400 ) 1035676800 =>Array ( [seconds] => 0 [minutes] => 0 [hours] => 2 [mday] => 27 [wday] => 0 [mon] => 10 [year] => 2002 [yday] => 299 [weekday] => Sunday [month] => October [0] => 1035676800 ) I don't know how is it with other dates, bud I think, that this bad result is not the only one - I maked some web application, which operates with dates and this problem was there more times ... good luck miran -- Edit bug report at: http://bugs.php.net/?id=13331&edit=1

« previous php.dev (#66054) next »