闰秒是否由日历提供? [英] Are leap seconds catered for by Calendar?

查看:104
本文介绍了闰秒是否由日历提供?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GregorianCalendar类是否满足闰秒的要求?

Are leap seconds catered for by the GregorianCalendar class?

如果没有,是否有任何第三方库满足它?

If not, does any 3rd party library cater for it?

推荐答案

java.util.Date API说

java.util.Date API says that

...虽然Date类旨在反映协调世界时间(UTC),但它可能不完全这样做,这取决于Java虚拟机的主机环境... ...大多数计算机时钟不够精确,不能反映闰秒的区别。

"...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."

Wiki说

因为地球的旋转速度因气候和地质事件而异,UTC闰秒插入每个UTC闰秒通常由国际地球自转和参考系统服务(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.

这篇关于闰秒是否由日历提供?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆