問題描述
GregorianCalendar 類是否滿足 閏秒?
Are leap seconds catered for by the GregorianCalendar class?
如果沒有,是否有任何 3rd 方庫滿足它?
If not, does any 3rd party library cater for it?
推薦答案
java.util.Date API 說
java.util.Date API says that
"...雖然 Date 類旨在反映協(xié)調世界時 (UTC),但它可能并不完全如此,這取決于 Java 虛擬機的主機環(huán)境....大多數(shù)計算機時鐘不夠準確能夠反映閏秒的區(qū)別."
"...although the Date class is intended to reflect coordinated universal time (UTC), it may not do so exactly, depending on the host environment of the Java Virtual Machine. ... Most computer clocks are not accurate enough to be able to reflect the leap-second distinction."
維基說
由于地球自轉速度會因氣候和地質事件而變化,因此 UTC 閏秒間隔不規(guī)則且不可預測.每個 UTC 閏秒的插入通常由國際地球自轉和參考系統(tǒng)服務大約提前六個月決定(IERS)"
"Because the Earth's rotation speed varies in response to climatic and geological events, UTC leap seconds are irregularly spaced and unpredictable. Insertion of each UTC leap second is usually decided about six months in advance by the International Earth Rotation and Reference Systems Service (IERS)"
也就是說,沒有班級可以知道未來 IERS 的決定.
that is, no class can know about future IERS decisions.
這篇關于日歷是否支持閏秒?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!