note 87079 deleted from function.strtotime by danbrown
| From: | danbrown@php.net | Date: | Sun, 09 Jan 2011 16:58:33 +0000 |
| Subject: | note 87079 deleted from function.strtotime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-175572@lists.php.net to get a copy of this message | ||
Note Submitter: harmor
----
<?php
/**
* strToTime wrapper
*
* @param string[optional] $time
* @param int[optional] $now
* @return bool|int - returns false for '0000-00-00' and '0000-00-00 00:00:00'
*/
public static function myStrToTime($time = '', $now = null)
{
if('0000-00-00' == $time || '0000-00-00 00:00:00' == $time) {
return false;
}
//In version 5.2.6 strToTime returns int(-62169966000) for the 0 dates above
return strToTime($time, $now);
}
?>