: getdate function behaviour

From: Date: Wed, 29 Oct 2008 04:53:11 +0000
Subject: : getdate function behaviour
Groups: php.internals 
Request: Send a blank email to internals+get-41542@lists.php.net to get a copy of this message
Hello, While I was working on getdate function, found different behavior with respect to http://in.php.net/manual/en/function.getdate.php This is observed only on linux 64bit. Here is code <?php $timestamp = -12.3456789000e10; var_dump( getdate($timestamp) ); ?> As per documentation weekday should be Sunday through Saturday but I got "Unknown". Here is the output: array(11) { ["seconds"]=> int(20) ["minutes"]=> int(23) ["hours"]=> int(5) ["mday"]=> int(23) ["wday"]=> int(-4) ["mon"]=> int(10) ["year"]=> int(-1943) ["yday"]=> int(295) ["weekday"]=> string(7) "Unknown" ====> It should be Sunday through Saturday ["month"]=> string(7) "October" [0]=> int(-123456789000) } Can somebody point-out what is the problem? And whether it is an expected behavior. -- Thanks, Sanjay Mantoor

« previous php.internals (#41542) next »