这是什么时间格式以及如何将其转换为标准化的日/月/年日期


What time format is this and how do I convert it to a standardized dd/mm/yyyy date?

我正在使用YouTube/Google API,对于特定视频的上传日期,将返回以下格式的时间/日期:

2012-05-16T17:15:29.000Z

我不确定这是什么格式,但我想知道是否有一种简单的方法(例如使用 DateTime() )将其转换为 dd/mm/yyyy 的格式?

任何提及时间格式的名称也将不胜感激;)。

将是UTC时间

date_format($date, 'd/m/Y'); 

除了@web_bod写的内容,您还可以执行

date('d/m/Y', strtotime('2012-05-16T17:15:29.000Z') );

是的,当然有。

$date = new DateTime("2012-05-16T17:15:29.000Z");
echo $date->format("d/m/Y");