Home > Backend Development > PHP Tutorial > 时间计算的有关问题

时间计算的有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:06:55
Original
832 people have browsed it

时间计算的问题
请问这样的时间格式怎么计算他们的时间差
2014-09-22T15:53:20Z
2014-09-22T13:53:20Z
------解决思路----------------------
T和Z是XML schema 的日期类型   Z表示用UTC时间  +8小时就是北京时间 

计算时间差
$ret = strtotime('2014-09-22T15:53:20Z')-strtotime('2014-09-22T13:53:20Z');//本来都需要减8小时
var_dump($ret);

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template