note 26209 added to function.mktime
| From: | phpnotes at ssilk dot de | Date: | Tue, 22 Oct 2002 14:24:58 +0000 |
| Subject: | note 26209 added to function.mktime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38423@lists.php.net to get a copy of this message | ||
Hmpf, forget this example above! This is well working code, php-mktime() is absolutly bulshit (in my
opinion) - has too many bugs:
// convert sql-like iso-time in number format to unix-timestamp
function sqltime_2_unixtime($str)
{
__if ( preg_match
__('°(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)°',$str,$m) ) {
____return( strtotime("$m[1]-$m[2]-$m[3] $m[4]:$m[5]:$m[6]"));
__}
__return(false);
}
--
http://www.php.net/manual/en/function.mktime.php
http://master.php.net/manage/user-notes.php?action=edit+26209
http://master.php.net/manage/user-notes.php?action=delete+26209
http://master.php.net/manage/user-notes.php?action=reject+26209