PHP 4.0 Bug #6345 Updated: wrong days in december of 2000
| From: | Bug Database | Date: | Sun, 27 Aug 2000 21:34:18 +0000 |
| Subject: | PHP 4.0 Bug #6345 Updated: wrong days in december of 2000 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-30856@lists.php.net to get a copy of this message | ||
ID: 6345
Updated by: rasmus
Reported By: hydrix@earthlink.net
Status: Feedback
Bug Type: Scripting Engine problem
Assigned To:
Comments:
Your timestamp in your example is for December 26 (PST).
Try this:
$blah = getdate(978282000);
echo $blah[mday];
This prints 31 for me. It will of course depend on your timezone. To really test it, try this:
$t = mktime(10,0,0,12,31,2000);
$blah = getdate($t);
echo $blah[mday];
This figures out the timestamp for 10 AM Dec.31 in your local timezone and then verifies that
getdate() does indeed return 31.
Full Bug description available at: http://bugs.php.net/?id=6345