GMT与UTC日期 [英] GMT vs UTC dates
问题描述
我有一个内置JavaScript的日历,将日期与PHP进行比较。 JavaScript日期对象使用PHP设置,但是当我比较未来的日期时,它们似乎不同步。
I have a calendar built in JavaScript that compares dates with PHP. The JavaScript date object is set using PHP, but, when I compare future dates, they appear to be out of sync.
PHP设置为GMT,JavaScript设置为世界标准时间;这些标准如何不同,这可能会导致问题吗?
PHP is set to GMT and JavaScript is set to UTC; how do these standards differ, and could this be causing the problem?
推荐答案
协调世界时(UTC)是基于国际原子时间(TAI)的时间标准,以不规则的间隔添加闰秒来补偿地球的减速旋转。
Coordinated Universal Time (UTC) is a time standard based on International Atomic Time (TAI) with leap seconds added at irregular intervals to compensate for the Earth's slowing rotation.
从维基百科的格林威治标准时间:
UTC是一个原子时间尺度,仅接近于GMT,容忍度为0.9秒。
UTC is an atomic time scale which only approximates GMT with a tolerance of 0.9 second
这篇关于GMT与UTC日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!