note 86674 added to function.mktime
| From: | Maffu at osu1 dot php dot net | Date: | Wed, 29 Oct 2008 11:05:58 +0000 |
| Subject: | note 86674 added to function.mktime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145923@lists.php.net to get a copy of this message | ||
When calling mktime(), be sure that you use values without leading zeros. The date comes out wrong
in the following example:
$endts = mktime(12, 00, 00, 12, 08, 2008, 0);
(note the 08 instead of just 8)
C's scanf() has a format specification where leading 0's can indicate an octal value -
perhaps this is related?
----
Server IP: 208.69.120.35
Probable Submitter: 155.31.65.223
----
Manual Page -- http://www.php.net/manual/en/function.mktime.php
Edit -- https://master.php.net/note/edit/86674
Del: integrated -- https://master.php.net/note/delete/86674/integrated
Del: useless -- https://master.php.net/note/delete/86674/useless
Del: bad code -- https://master.php.net/note/delete/86674/bad+code
Del: spam -- https://master.php.net/note/delete/86674/spam
Del: non-english -- https://master.php.net/note/delete/86674/non-english
Del: in docs -- https://master.php.net/note/delete/86674/in+docs
Del: other reasons-- https://master.php.net/note/delete/86674
Reject -- https://master.php.net/note/reject/86674
Search -- https://master.php.net/manage/user-notes.php