我得到了publishedAt 结果,Youtube API
但我想使用php 将其转换为日期和时间,我该怎么做?
发表于正文:2018-08-14T14:30:02.000Z
正如灰色所说,您可以使用 strtotime() 和 date() 来格式化日期。
$googleTime = '2018-08-14T14:30:02.000Z';
$strtotimeFormat = strtotime($googleTime);
$dateTimeFormat = date('Y-m-d H:i:s', $strtotimeFormat)
var_dump($dateTimeFormat)
输出:'2018-08-14 14:30:02'
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句