|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-08-25 04:27 UTC] hydrix at earthlink dot net
I've found a bug doing some calendar scripts. For example $blah = getdate(977893200); echo $blah[mday]; (the unix timestamp is a december 200 ts) shows only 30 days for december. No wonder I have been getting so many headaches! Yall need to fix this little bug. :) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 10 11:00:01 2026 UTC |
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.