【发布时间】:2017-10-18 16:45:26
【问题描述】:
我从没想过会如此痛苦。将此时间戳转换回 strtotime() 接受的标准 PHP 时间戳的最佳方法是什么? :
2017 年 9 月 29 日 7:16 UTC
格式为:
日期("F j, Y, G:i T")
【问题讨论】:
-
使用
strtotime会发生什么? -
转换正常,
$timestamp = strtotime('September 29, 2017, 7:16 UTC'); echo $timestamp; echo date("F j, Y, G:i T",$timestamp);是什么问题? -
感谢您的快速回答和确认!确实,还有另一个问题,可能在我提供给 strtotime 的字符串中。我不知道,可能问题出在屏幕和椅子之间。