思路用strtotime转换时间的字符串
$t='2017-03-09 02:30'; echo(date('Y-m-d H-i', strtotime($t)));
转载于:https://www.cnblogs.com/c-x-a/p/6600484.html