No matching activity found.
|Default Leap Second Handling on 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.|
|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.|
|If <acronym>NTP</acronym> is not being used, manual adjustment of the system clock will be required after the leap second has passed.|
|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.|
|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.|
|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.|
|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.|
|Please try to make sure nothing horrible happens because of the leap second.|
|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:|
|<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.|
|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.|
No matching activity found.