php获取格式时间和时间戳
function get_intime($intime,$format){ if($intime==""){ return ""; } $format = isset($format)?$format:'Y-m-d H:i:s'; if(preg_match('/\d{10,}/is',$intime)){ return date($format,$intime);; }else{ return date($format,strtotime($intime));; } }
function get_intime_strtotime($time){//获取时间戳 return strtotime(get_intime($time)); }
php获取格式时间和时间戳
posted on 2014-08-27 11:08 chenzhaojx 阅读(186) 评论(0) 编辑 收藏 举报