Home  >  Article  >  Backend Development  >  时间-time() - date('Z')有什么用?为什么date('Z')的值是0?

时间-time() - date('Z')有什么用?为什么date('Z')的值是0?

WBOY
WBOYOriginal
2016-06-02 11:33:471234browse

时间phpdatetime时区

<code> /** * 获得当前格林威治时间的时间戳 * * @return  integer */function gmtime(){    return (time() - date('Z'));}</code>

看到一个函数的作用是获得当前格林威治时间的时间戳
为什么我echo date('Z') 输出的值是0?
我们不是北京时间吗。date(''Z'')是时区偏移秒数,应该不是0才对

Statement:
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