(itstool) path: sect1/title
Context English Chinese (Simplified) (zh_CN) State
Default Leap Second Handling on FreeBSD FreeBSD 对闰秒的默认处理方式
The easiest way to handle leap seconds is with the <acronym>POSIX</acronym> time rules FreeBSD uses by default, combined with <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/network-ntp.html"><acronym>NTP</acronym></link>. When <citerefentry><refentrytitle>ntpd</refentrytitle><manvolnum>8</manvolnum></citerefentry> is running and the time is synchronized with upstream <acronym>NTP</acronym> servers that handle leap seconds correctly, the leap second will cause the system time to automatically repeat the last second of the day. No other adjustments are necessary. 处理闰秒最简单的方法是使用 FreeBSD 预设的 <acronym>POSIX</acronym> 时间规则, 以及 <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/network-ntp.html"><acronym>NTP</acronym></link>。如果 <citerefentry><refentrytitle>ntpd</refentrytitle><manvolnum>8</manvolnum></citerefentry> 正在运行,并且时间和正确处理闰秒的上游 <acronym>NTP</acronym> 服务器同步,闰秒将使系统时间自动重复当天的最后一秒。不需要进行其它调整。
If the upstream <acronym>NTP</acronym> servers do not handle leap seconds correctly, <citerefentry><refentrytitle>ntpd</refentrytitle><manvolnum>8</manvolnum></citerefentry> will step the time by one second after the errant upstream server has noticed and stepped itself. 如果上游的 <acronym>NTP</acronym> 服务器没有正确处理闰秒,<citerefentry><refentrytitle>ntpd</refentrytitle><manvolnum>8</manvolnum></citerefentry> 会在错误的上游服务器发现错误并修正后,跟着加上一秒。
If <acronym>NTP</acronym> is not being used, manual adjustment of the system clock will be required after the leap second has passed. 如果未使用 <acronym>NTP</acronym>,将需要在闰秒过后手动调整系统时钟。
Cautions 注意
Leap seconds are inserted at the same instant all over the world: <acronym>UTC</acronym> midnight. In Japan that is mid-morning, in the Pacific mid-day, in the Americas late afternoon, and in Europe at night. 闰秒在全世界的同一瞬间插入:<acronym>UTC</acronym> 午夜。日本在上午,太平洋在正午,美洲在傍晚,而欧洲在晚上。
We believe and expect that FreeBSD, if provided correct and stable <acronym>NTP</acronym> service, will work as designed during this leap second, as it did during the previous ones. 我们相信并预期,如果提供了正确和稳定的 <acronym>NTP</acronym> 服务,FreeBSD 会在闰秒时按设计运作,正如在之前遇到闰秒时一样。
However, we caution that practically no applications have ever asked the kernel about leap seconds. Our experience is that, as designed, leap seconds are essentially a replay of the second before the leap second, and this is a surprise to most application programmers. 然而我们要警告,事实上没有应用程序会向内核询问关于闰秒的事。我们的经验是,闰秒正如设计的一样,本质上是闰秒前一秒的重播,这对大部分应用程序开发者来说是意想不到的事。
Other operating systems and other computers may or may not handle the leap-second the same way as FreeBSD, and systems without correct and stable <acronym>NTP</acronym> service will not know anything about leap seconds at all. 其它操作系统和电脑可能会也可能不会像 FreeBSD 一样处理闰秒,没有正确和稳定 <acronym>NTP</acronym> 服务的系统一点也不知道闰秒的发生。
It is not unheard of for computers to crash because of leap seconds, and experience has shown that a large fraction of all public <acronym>NTP</acronym> servers might handle and announce the leap second incorrectly. 电脑因为闰秒而崩溃并非闻所未闻,经验显示,大量的公共 <acronym>NTP</acronym> 服务器可能会错误处理和公告闰秒。
Please try to make sure nothing horrible happens because of the leap second. 请试着确认不会因为闰秒而发生任何可怕的事情。
Testing 测试
It is possible to test whether a leap second will be used. Due to the nature of <acronym>NTP</acronym>, the test might work up to 24 hours before the leap second. Some major reference clock sources only announce leap seconds one hour ahead of the event. Query the <acronym>NTP</acronym> daemon: 测试是否将使用闰秒是可行的。由于 <acronym>NTP</acronym> 的性质,测试可能要运行到闰秒前24小时。有些主要的参考时钟来源只在闰秒事件前一小时公告。查询 <acronym>NTP</acronym> 守护进程:
<prompt>%</prompt> <userinput>ntpq -c 'rv 0 leap'</userinput> <prompt>%</prompt> <userinput>ntpq -c 'rv 0 leap'</userinput>
Output that includes <literal>leap_add_sec</literal> indicates proper support of the leap second. Before the 24 hours leading up to the leap second, or after the leap second has passed, <literal>leap_none</literal> will be shown. 包含 <literal>leap_add_sec</literal> 的输出表明了对于闰秒的正确支持。<literal>leap_none</literal> 会在闰秒前24小时或闰秒过后显示。
Conclusion 结论
In practice, leap seconds are usually not a problem on FreeBSD. We hope that this overview helps clarify what to expect and how to make the leap second event proceed more smoothly. 在实践中,FreeBSD 中的闰秒通常不是个问题。我们希望这篇文章能解释清楚这方面可能出现的状况,以及如何使闰秒事件进行得更顺利。
This translation Translated FreeBSD Doc/articles_leap-seconds 结论
The following strings have the same context and source.
Not translated FreeBSD Doc/articles_linux-users
Translated FreeBSD Doc/books_arch-handbook 小结

Change compared to this translation:


4 months ago
Browse all component changes


English Chinese (Simplified) (zh_CN)
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect1/title
Source string location
String age
4 months ago
Source string age
a year ago
Translation file
articles/zh_CN/leap-seconds.po, string 24