Currently we only know that DATE_ATOM formatted into UTC is 2012-08-24T14:02:15 00:00. How can the latter offset be generated through a function? ? ? ?
高洛峰2017-06-29 10:10:52
The last -04:00 is the offset between the current time zone and the UTC standard time zone.
If you set the time zone (such as Beijing), then the offset (+08:00) East Eighth District
date("P"); // 显示时区偏移量
Your -04:00 indicates that the time zone set is -04:00 (West 4th District)
三叔2017-06-29 10:10:52
Excerpted from PHP documentation:
http://php.net/manual/en/func...
You can use date('O')
or date('P')
, depending on what format you need.