note 54724 added to function.mktime
| From: | rng_wlf at yahoo dot com | Date: | Wed, 13 Jul 2005 17:35:39 +0000 |
| Subject: | note 54724 added to function.mktime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91914@lists.php.net to get a copy of this message | ||
Is it a bug that adding an arbituary amount to seconds to the second field causes the time field to
be capped at 59 seconds?
my code:
$test = date("Y-m-d H:i:s", mktime($date[hour] ,$date[minute], (int)$date[second] + 60,
$date[month],$date[day],$date[year]));
$date is an array with individual time sections as array elements
the initial time to this code is:
2005-07-13 11:25:48
the text of $test is after running the above code is:
2005-07-13 11:25:59
it should be:
2005-07-13 11:26:48
right?
I'm using PHP 4.3.11 on Gentoo
----
Manual Page -- http://www.php.net/manual/en/function.mktime.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54724
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54724&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54724&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54724&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54724&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54724&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54724&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54724&report=yes
Search -- http://master.php.net/manage/user-notes.php