note 82467 deleted from function.mktime by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 03:27:58 +0000 |
| Subject: | note 82467 deleted from function.mktime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142063@lists.php.net to get a copy of this message | ||
Note Submitter: LP
----
In response to : zhenya dot t at livelynk dot com
You said :
mktime() seems to produce an incorrect result when you have months and dates prefixed with 0.
eg. mktime(0, 0, 0, 04, 08, 2008);
will produce an incorrect result where as
mktime(0, 0, 0, 4, 8, 2008);
produces the correct result.
---------------------------------------------------
Resolution:
You can simply call the function intval(<your parameter>) inside the function:
eg. mktime(0, 0, 0, intval('04'), intval('08'), 2008);
will produce a correct result