Referencing: http://cr.yp.to/proto/utctai.html
People have this funny idea that time measurements should be reliable: 24 hours in a day, 365 days in a year, and so on. Of course the physical universe doesn't work that way: a year is slightly more than 365 days, a day is every so slightly longer than the number of seconds in 24 hours, so we need to adjust things now and then. A second is defined by Cesium radiation decay and that's TAI time, but if we used that for our clocks, we'd get slippage, so we use UTC time, which introduces leap seconds when needed. This keeps the Sun overhead at high noon, but is more than a small problem for computers.
It's not that computers can't set their time just as you set your watch, but programs that rely on doing something at specific intervals will of course be unreliable if time changes in mid-stream. Naturally, that could be upsetting: (from http://www.uwsg.iu.edu/hypermail/linux/kernel/9809.1/0219.html ):
.. proposed a similar solution: gettimeofday() will not return during 23:59:60. If a process calls gettimeofday() during a leap second, then the call will sleep until 0:00:00 when it can return the correct result. This horrified the real-time people. It is, however, strictly speaking, completely correct.
Unix time is based on seconds since Jan 1 1970, and of course every OS has some similar scheme. Microsoft takes its lumps on UTC leap seconds: DateTime - Not As Simple As You Think by Olav Lerflaten discusses .NET's issues on this subject.
There are proposals to fix the problem: Make NTP timestamps leap-second-neutral (like GPS time), and these of course generate lots of sometimes heated discussion.
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar