3 * template_lite tpl_create_timestamp function
5 * Taken from the original Smarty
6 * http://smarty.php.net
9 function tpl_make_timestamp($string)
15 $time = strtotime($string);
16 if (is_numeric($time) && $time != -1)
21 // is mysql timestamp format of YYYYMMDDHHMMSS?
22 if (is_numeric($string) && strlen($string) == 14)
24 $time = mktime(substr($string,8,2),substr($string,10,2),substr($string,12,2),substr($string,4,2),substr($string,6,2),substr($string,0,4));
28 // couldn't recognize it, try to return a time
29 $time = (int) $string;