Bug #13331 Updated: bad results of "getdate()" function
| From: | derick@php.net | Date: | Sun, 16 Sep 2001 20:33:27 +0000 |
| Subject: | Bug #13331 Updated: bad results of "getdate()" function | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-66060@lists.php.net to get a copy of this message | ||
ID: 13331
Updated by: derick
Reported By: miran@centrum.cz
Status: Bogus
Bug Type: Date/time related
Operating System: win2k
PHP Version: 4.0.6
New Comment:
You just discovered daylight savings time...
Derick
Previous Comments:
------------------------------------------------------------------------
[2001-09-16 15:48:58] hholzgra@php.net
ever heard of daylight saving time? :)
------------------------------------------------------------------------
[2001-09-16 15:17:15] miran@centrum.cz
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 this bug report at http://bugs.php.net/?id=13331&edit=1