2 ms·
The interesting thing there is that these problems of wall-clock time have largely been solved at every level other than seconds. Years vary in length - 365 or
by qntm 16y ago
The interesting thing there is that these problems of wall-clock time have largely been solved at every level other than seconds.
Years vary in length - 365 or 366 days. It's 29th February. Add one year. Is it 28th February or 1st March? What if it's 28th February or 1st March now, but next year is a leap year?
Months vary in length - 28, 29, 30 or 31 days. It's 31st March. Add one month. What is the date? 30th April or 1st May? What if it's 30th March? Is your "add one month" function strictly increasing?
We KNOW that days vary in length - 23, 24 or 25 hours. It's 00:59 and the clocks go forward today. Add two minutes. What time is it? 01:01 or 02:01? It's 01:59 and the clocks go back today. Add two minutes. Is it 01:01 or 02:01?
Now we simply have a situation where a minute can also vary in length - 59, 60 or 61 seconds. It's 23:59:58. Add 2 seconds. Is it 00:00:02, 00:00:00 or 23:59:60?
These problems are not difficult. The same approaches can be applied to each one. The only difficulty is awareness. Leap seconds are rarer and less predictable than Daylight Saving, month boundaries or even leap years. But Daylight Saving isn't predictable either - the rules change all the time. Just solve it with tables.
- gambler 16y agoThe solutions you describes are designed to keep calendar in sync with Earth rotation around the Sun and around its own axis. However, there is no real need to keep computer timers synchronized with Earth rotation. The simplest way to keep track of time for computers is to count seconds from a certain agreed-upon point, without leaps, stretches, or arbitrary transition tables - without needless complexity. If I don't care about calendar (Earth rotation) I shouldn't care about any of that stuff either. In short, no leap seconds would mean simpler, more reliable software.
- qntm 16y agoTAI, then? TAI is UTC but without any leap seconds: http://en.wikipedia.org/wiki/International_Atomic_Time http://en.wikipedia.org/wiki/International_Atomic_Time