日期T&Z格式 [英] Date T & Z format
本文介绍了日期T&Z格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$date = "2017-04-28T20:12:55Z";
echo date("Y-m-d H:i:s", strtotime($date))."\n";
输出 2017-04-29 01:42:55
-如何知道$ date在哪个时区表示?
outputs 2017-04-29 01:42:55
- How can I know in which timezone, $date is represented in ?
推荐答案
Z是时区,它是Zulu时区的缩写
Z is the timezone and it's the abreviation of Zulu Time Zone
通常,要获取日期的时区,可以使用:
And in general, to get the timezone of a date you can use:
$date = new DateTime($aStringDate);
echo $date->format('T');
这篇关于日期T&Z格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文