如何转换此日期:
2015年12月9日00:21:58
到PHP中的unix时间戳格式?
您可以使用DateTime类和getTimestamp方法。
$date = new DateTime('Dec 09 2015, 00:21:58');
echo $date->getTimestamp();
或strtotime函数。
strtotime('Dec 09 2015, 00:21:58')
您可以像这样使用strtotime函数:
<?php
echo strtotime("Dec 09 2015, 00:21:58");
?>