note 44672 rejected from function.mktime by vincent
| From: | vincent@php.net | Date: | Thu, 12 Aug 2004 20:56:57 +0000 |
| Subject: | note 44672 rejected from function.mktime by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-74555@lists.php.net to get a copy of this message | ||
Note Submitter: matthewslyman@hotmail.com
----
mktime returns inconsistent results when leading zeroes are present in time values. Be careful to
omit leading zeroes.
e.g.
$time_UX = mktime(8,09,00, 2, 1, 1970);
echo date('H:i:s',$time_UX);
$time_UX = mktime(8,06,00, 2, 1, 1970);
echo '<br>'.date('H:i:s',$time_UX);
$time_UX = mktime(8,9,00, 2, 1, 1970);
echo '<br>'.date('H:i:s',$time_UX);
produces:
08:00:00
08:06:00
08:09:00
Perhaps this is indicative of a deeper problem in PHP's handling of numbers?