从接口获取的时间格式 2018-12-23T01:41:28Z PHP 中怎么把这个格式的时间转成时间戳呢?

2018-12-23 15:16:31 +08:00
 xoxo419
4385 次点击
所在节点    PHP
23 条回复
lepig
2018-12-24 00:10:06 +08:00
楼主到目前为止可能都没用过 strtotime 吧
cbasil
2018-12-24 10:33:37 +08:00
strtotime — 将任何字符串的日期时间描述解析为 Unix 时间戳

int strtotime ( string $time [, int $now = time() ] )
楼主多看看 PHP 文档吧
http://php.net/manual/zh/function.strtotime.php
stephanew
2018-12-25 11:04:44 +08:00
DateTime 类了解一下

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/520195

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX