Slashdot Mirror


'Leap Seconds' May Be Eliminated From UTC

angry tapir writes "Sparking a fresh round of debate over an ongoing issue in time-keeping circles, the International Telecommunications Union is considering eliminating leap seconds from the time scale used by most computer systems, Coordinated Universal Time (UTC). Since their introduction in 1971, leap seconds have proved problematic for at least a few software programs. The leap second added on to the end of 2008, for instance, caused Oracle cluster software to reboot unexpectedly in some cases."

42 of 470 comments (clear)

  1. Hmmm by HappyClown · · Score: 5, Funny

    Now waaaaaait just one second! Oh, scratch that...

  2. Poor solution by LostMyBeaver · · Score: 5, Insightful

    The proper solution is to make programmers aware of leap seconds. There are 86400 seconds in a normal day, however there is an additional second added once or twice a year to adjust for solar time.

    Wikipedia documents it quite well and programmers in modern times should be heading to wikipedia almost constantly anyway. The real problem occurs when the date/time is given in seconds since an "event" such as Jan 1, 1970. Most programmers don't know about leap seconds and I must admit, I don't generally bother calculating for them. But if it were necessary, it would be relatively trivial to do so.

    We shouldn't remove fixes to the clock just because programmers are undereducated. I'm quite convinced that just posting this on Slashdot will raise awareness across a high percentage of the programming world.

    I also always wondered why undergraduate studies for computer science didn't make time a relevant issue. It seems as if it's one of the more complex topics and yet, we don't pay any attention to it. Last formal education I had on time (not talking about physic related, but calendar) was in primary school. There are so many time systems out there that we should pay more attention to educating programmers on it.

    1. Re:Poor solution by LostMyBeaver · · Score: 4, Interesting

      Nobo has a point... but it would make it so that the hardware engineers would suffer instead of the software ones. 1/86,4000 of a day = 1 second could be a fair solution. All we would need to do then would be to come up with a new atomic clock which allows for the alteration and then come up with computer crystals that are accurate to the new system (hey, let's get ones that are accurate to begin with, that would be great).

      But, since respectable companies tend to run their own SNTP servers and they themselves adjust against national servers (we hope), it could simply be a good idea to ditch the leap second in favor of fixing all the clocks.

      But, I think the real issue of the article is the occasions where "17:59:60" is a valid time. I think for presentation (and databases), it would in fact have been better to simply prolong 17:59:59 or progressively added a millisecond for the next 1000 seconds for example. Although it might through off scientific calculations during that period, the impact would be less critical.

    2. Re:Poor solution by Thorsett · · Score: 5, Insightful

      Why adjust for solar time?

      We adjust for solar time because UTC is an astronomical timescale, not a "count of seconds since a specific time." If "computer people" want a timescale that ignores leap seconds, they can use an atomic timescale like TAI (or GPS time, which is a constant offset from TAI). But choosing to standardize the internet on UTC and then complaining it is too hard to do the programming right is a little like buying a house next door to a turkey farm and complaining about the smell.

    3. Re:Poor solution by dcollins · · Score: 3, Funny

      I nominate you to write the interface between the physicists' Geiger-counter measuring "SI-seconds" in an experiment, and the computer software that works in "time-t-seconds", accounting for all the past & future history of changed time-t-seconds. Sounds so simple.

      --
      We know where leadership by an anti-intellectual "strongman" who scapegoats minorities and likes boisterous rallies goes
    4. Re:Poor solution by toastar · · Score: 3, Informative

      if you were to count the number of days since the 0AD

      You'd get very confused - there was no 0 AD (or BC for that matter).

      1 BC was followed by 1 AD.

      Well if you want to get technical it was neither.

      I think it was called 753 AUC

    5. Re:Poor solution by Chrisq · · Score: 3, Informative

      1 BC was followed by 1 AD.

      Not with ISO 8601 time representation, which is more logical having a year zero before year one.

    6. Re:Poor solution by Dwonis · · Score: 3, Informative

      I think it was called 753 AUC

      According to Wikipedia, it tended only to be called that by later historians:

      Renaissance editors sometimes added AUC to Roman manuscripts they published, giving the false impression that the Romans usually numbered their years using the AUC system. In fact, modern historians use AUC much more frequently than the Romans themselves did. The dominant method of identifying Roman years in Roman times was to name the two consuls who held office that year. The regnal year of the emperor was also used to identify years, especially in the Byzantine Empire after 537 when Justinian required its use.

  3. Oracle by Anonymous Coward · · Score: 5, Interesting

    Perhaps Oracle should concentrate more on making their software reliable, and less on lawsuits.

    From what I recall Digital VMS didn't have that problem, and even had no problems migrating an always on system over different processors, and keeping the cluster running over more than 15 years. One second and Oracle crashes.

    It's a pity which of those companies survived.

  4. The problem with leap seconds... by NixieBunny · · Score: 4, Informative

    They aren't predictable in advance. They are basically the noise in the solar system's timekeeping. It's impossible to write code that knows in advance when they will occur, since they are only announced six months ahead of time. So any clock that wants to stay in sync with UTC must be connected to either NTP or GPS or similar timekeeping service.
    If only those darn astronomers didn't care so much about keeping the sun at Greenwich precisely at the meridian at high noon, we wouldn't have this problem.

    --
    The determined Real Programmer can write Fortran programs in any language.
    1. Re:The problem with leap seconds... by joe_frisch · · Score: 5, Funny

      We could fix this tricky programming issue by regularly adjusting the earth's orbit....

  5. Re:Oracle sholuld simply fix their software... by nacturation · · Score: 5, Informative

    Isn't the problem with Oracle here? It should not be that difficult to fix their software. What's the difference with Summer time change?

    The difference with spring/fall time changes is that although the local time may change, the UTC time does not. In other words, your offset from UTC (eg: GMT-8) may get adjusted depending on your location's observance of daylight savings time but UTC itself simply marches on oblivious to anything. The leap second is the one exception.

    --
    Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
  6. Changing time because of Oracle? by koinu · · Score: 4, Insightful

    Leap seconds are handled well, when the system supports it well and the software is not utter crap.

    I am always annoyed when people break basic things to make software work (e.g. hardware, also see ACPI). Now they are not only breaking hardware, but redefining measurements to make buggy software work. What comes next?

    I can understand when something is changed for convenience purposes (to have simpler calculations), but justified with buggy software is plain wrong. And I surely don't care if an Oracle database "reboots"... whatever that might mean.

  7. Re:Stupid by tagno25 · · Score: 4, Informative

    Yeah, leap seconds suck, but the proposed solution (to let UTC drift farther and farther away from reality) sucks even harder. UTC should just be abolished in favor of UT1. Computer clocks are so crude anyway (mine is off by 3 seconds right now) that the supposed benefits of UTC's constant second are really non-existent, every computer needs to have its time adjusted now and then no matter what.

    And that is what NTP is for. To automatically adjust the computers clock to account for drift.

  8. The root of the problem by Joosy · · Score: 4, Funny

    The original article has a quote from one person who sees through the mess to the root of the problem:

    The revision "doesn't resolve the underlying geophysical issue"

    Simply resolve the "underlying geophysical issue" and the problem will be solved.

    --
    I'm sick and tired of these hip, "ironic" sigs. This is an actual, honest-to-goodness no-nonsense sig!
  9. Ok... by Chyeld · · Score: 5, Insightful

    Isn't this like legislating that PI is 3.14 because some people have problems with the idea of irrational numbers? If programs have issues with leap seconds, it sounds like programs weren't written properly, not that the spec needs to be rewritten to accommodate this flaw. Would these same people have demanded that it be 1999 again to avoid all the costs of the Y2K fixes?

  10. the problem will not go away even without leaps by at10u8 · · Score: 3, Informative

    The historical record of time_t is already ambiguous and cannot be corrected by abandoning leap seconds. There is a way to get leap seconds out of the kernel and into user space which amounts to reclassifying them as decrees of change of civil time and putting them into zoneinfo while letting the broadcast time scale not have leaps. It's a matter for posterity whether the word "day" will be re-defined by the ITU-R, changed from the current treaty-specified "mean solar day" to a technically-defined "atomic day".

  11. Re:Stupid by mikael_j · · Score: 3, Informative

    Well, if you tell your NTP client to use those ten servers for setting the time chances are your computer's clock will be very accurate.

    --
    Greylisting is to SMTP as NAT is to IPv4
  12. The best solution is a robust solution by Chuck+Chunder · · Score: 3, Interesting

    I think it makes absolutely no sense for most computers or programmers to have to account for leap seconds.

    The reality is that computers already have to allow for their clock drifting from universal time, that's why we have NTP. There's no point getting individual computers account for leap seconds, it would be easier and less error prone if reference clocks transparently accomodate leap seconds (ie without sending a 23:59:60 to the world) and everyone else can just drift back in sync with them when one occurs.

    There may be a few applications where a computer really does need to accomodate leap seconds (such as a reference clock!) but for the rest of us the additional complexity gives no advantage whatsoever.

    --
    Boffoonery - downloadable Comedy Benefit for Bletchley Park
  13. Re:Unreliable by dakameleon · · Score: 3, Interesting

    So you knew that leap seconds should be tested for, did you?

    I'm not defending Oracle, but at least give them this much credit - leap seconds don't exactly spring to mind when you're planning a test suite for software. Certainly after this incident I can't imagine they would miss it again, but I'd have been surprised if anyone can claim they knew to test for these beforehand.

    --
    Man who leaps off cliff jumps to conclusion.
  14. Re:Oracle sholuld simply fix their software... by carini · · Score: 3, Interesting

    Insted of using "leap" seconds why NTP dosn't use a longer interval to adjust the time in small steps?. With 1/1000s adjustment every 1024 seconds (which is the polling interval for most stable ntp client) the leap seconds adjustment need less than 2 week to complete.

  15. The real problem is using seconds for everything by Terje+Mathisen · · Score: 5, Interesting

    I've worked with NTP for nearly 20 years now, and the leap second adjustments isn't a real problem.

    The crux of the matter is that we've insisted (in both Unix and Windows) on measuring calendar events in seconds:

    The proper solution is to use Julian Day Number as the basic unit for calendars and (SI) seconds for any kind of short-term measurement. If you really need second/sub-second precision for long-term (multi-day) measurements, then you have to accept that the conversion is not just a matter of multiplying/dividing by 86400.

    Calendar appointments and similar things should be defined by day number and some form of fractional day, not SI seconds.

    NTP is somewhat to blame though: Even though it has full support for leap second handling (both adding and subtracting), the core of the protocol pretends that UTC seconds (without leap adjustments) is sufficient, i.e. NTP timestamps are defined to be in a 64-bit fixed-point format with 32 bits counting seconds since 1900-01-01 and 32 bit for the fractional seconds, i.e. sufficient to handle a 136-year block with a quarter of a ns resolution.

    http://www.eecis.udel.edu/~mills/ntp/html/ntpd.html#leap

    This causes small hiccups for an hour or so after each adjustment: The primary servers and those that either have a leap-second aware source or a cluefull operator keep in sync throughout the adjustment, while the remainder will slowly detect that their local clocks seems to be a full second off. Since this is way more than the default +/- 128 ms which NTP is willing to handle with gradual adjustments, NTPD will instead step the clock (backwards for an added leap second) and restart the protocol engine, after discarding all history.

    Modern versions of NTP have been rewritten to use a vote between all otherwise good servers: If a majority claim that there will be a leap second at the end of the current day, then the local deamon will believe them, and thereby stay in sync even during the actual leap second itself.

    Terje

    --
    "almost all programming can be viewed as an exercise in caching"
  16. Let's see if I've got this right by Joce640k · · Score: 5, Insightful

    We have to make every clock in the world inaccurate because Oracle's software is crap...?

    --
    No sig today...
    1. Re:Let's see if I've got this right by TheRaven64 · · Score: 4, Interesting

      Do we actually care about that level of accuracy? The leap second is a stupid idea to start with. We have leap years because a calendar year is about a quarter of a day shorter than a solar day. Without them, you'd have the seasons slowly moving around the calendar. The equinox would move by one day every four years, and so on. This was a problem for pre-technical societies, which depended heavily on the calendar for planting crops and avoiding starving, but it's irrelevant now. We're stuck with it though, and it does make it a bit easier to remember where the seasons are, although they won't change by much over a person's lifetime.

      Leap seconds, in contrast, are completely pointless. They exist because the SI day is slightly shorter than the solar day, by a tiny fraction of a second. This means that, after a few years, the sun will not quite be at its apex precisely at midday. How much is the variation? We've had 24 leap seconds since they were introduced in 1972, but a lot of these were to slowly correct the already-wrong time. In the last decade, we've had two. At that rate, it will take 300 years for the sun to be a minute off. It will take 18,000 years for it to be an hour off. These numbers are slightly wrong. The solar day becomes a bit under 2ms longer every hundred years, so we'd need leap seconds more often later.

      In the short term, they introduce a lot of disruption (see air traffic control problems for a good reason why we shouldn't have them - safety-critical systems that depend on time synchronisation and don't reliably work with leap seconds. Great). They don't provide any noticeable benefit. Maybe after a thousand or so years, UTC time will be offset enough from the solar day that it will be irritating, but if people still care about the relationship between noon and midday then they can add a leap-minute or two to compensate. Or they can just let it drift. I'd like to think that a significant proportion of the human population will not be on the Earth by that point, and so purely local inconsistencies with the time won't matter to them.

      --
      I am TheRaven on Soylent News
    2. Re:Let's see if I've got this right by WiglyWorm · · Score: 3, Insightful

      Pretty typical "let future generations deal with it" thinking. Why don't we just have Oracle fix their code?

    3. Re:Let's see if I've got this right by stdarg · · Score: 5, Funny

      Eh, let a future generation fix Oracle's code.

    4. Re:Let's see if I've got this right by Burdell · · Score: 4, Interesting

      It wasn't just Oracle. The Linux kernel would deadlock if the system was under load when the leap second happened. I only had one server hang, but a customer with a rack of busy servers had about half of them freeze. Lots of "fun" on New Year's Eve. Even more annoying was that the problem wasn't in handling the leap second, it was in printing a message that the leap second had been handled.

    5. Re:Let's see if I've got this right by Kjella · · Score: 5, Insightful

      Daylight Savings has had numerous studies showing reduced electricity consumption.

      Yes, the question is more if there's more or less hassle to have summer and winter opening hours than to change "time" itself.

      --
      Live today, because you never know what tomorrow brings
    6. Re:Let's see if I've got this right by AltairDusk · · Score: 5, Insightful

      Flight industry and safety equipment also goes through very stringent testing. If the capability to handle leap seconds isn't included in their battery of tests then they have a hole in their testing procedure.

    7. Re:Let's see if I've got this right by mangu · · Score: 3, Insightful

      They exist because the SI day is slightly shorter than the solar day, by a tiny fraction of a second.

      Wrong. They exist because the solar day is getting longer every time. The tides caused by the moon are slowing down the earth's rotation rate.

      safety-critical systems that depend on time synchronisation and don't reliably work with leap seconds

      They should. If a programmer is so incompetent he can't get leap seconds right, I shudder to think what else he did wrong.

    8. Re:Let's see if I've got this right by TheRaven64 · · Score: 4, Insightful

      No it can't, for three reasons. Firstly, leap days are deterministic. They happen based on a set of simple rules. If the year is divisible by 4, you get a leap year, unless the year is divisible by 100 but not by 400. Leap seconds, in contrast depend on a variable that changes daily, so are not predictable. They are fudged in with a few months notice, requiring every computer that needs to deal with them to be updated regularly.

      Secondly, leap years don't violate basic sanity checking rules. You can assert that every month is 28-31 days, and that's not broken by leap years. You can assert that every minute contains 60 seconds. In the last decade, that has been true for 2,106,718 minutes, and false for 2. In every year before 1970, it was true.

      Finally, leap years solve a real problem. The point of a solar calendar is that the seasons are in the same place every years. Having the seasons move made it difficult for people to plan when to plant crops. It's less important now, but having the seasons move around would be noticeable for everyone and irritating for a lot of people. In contrast, the only 'problem' that leap seconds solve is that the sun is not at its highest above the meridian at precisely 12:00. As the poster above you pointed out, the skew from not having leap seconds for a thousand years makes less of a difference to the position of the sun than simply not living quite on the meridian.

      Leap seconds are a (very) complex solution looking for a problem.

      --
      I am TheRaven on Soylent News
    9. Re:Let's see if I've got this right by cizoozic · · Score: 5, Funny

      Leap seconds, in contrast, are completely pointless. They exist because the SI day is slightly shorter than the solar day, by a tiny fraction of a second. This means that, after a few years, the sun will not quite be at its apex precisely at midday. How much is the variation? We've had 24 leap seconds since they were introduced in 1972, but a lot of these were to slowly correct the already-wrong time. In the last decade, we've had two. At that rate, it will take 300 years for the sun to be a minute off. It will take 18,000 years for it to be an hour off. These numbers are slightly wrong. The solar day becomes a bit under 2ms longer every hundred years, so we'd need leap seconds more often later.

      Well in that case it's probably easier for Oracle to just buy the Sun.

    10. Re:Let's see if I've got this right by JonahsDad · · Score: 3, Informative

      The first two things that came to mind were the Indiana DST changeover and the Australia study. Then I found this nice Wall Street Journal article that mentions both: http://online.wsj.com/article/NA_WSJ_PUB:SB120406767043794825.html

    11. Re:Let's see if I've got this right by rainmaestro · · Score: 3, Informative

      On the other hand, modern studies such as:

      http://energy.ca.gov/2007publications/CEC-200-2007-004/CEC-200-2007-004.PDF

      and

      http://online.wsj.com/public/article/SB120406767043794825.html
      (don't have a link to the article they published, sorry)

      These imply that the savings are negligible or, in the case of Indiana, *increased* electric usage. There is no clear answer, since the results depend heavily on the breakdown of electric usage (A/C, eletronics, etc), which varies depending on your region.

    12. Re:Let's see if I've got this right by Rockoon · · Score: 4, Informative

      ..or its actually difficult to 'handle' leap seconds. I can tell that you've never worked seriously with time values as a programmer.

      If you can't answer "When will each of the next 10 leap seconds be?" and "When were the last 10 leap seconds?" then you are pretty much fucked from a programming standpoint of 'handling' it in any sane manner using common time encodings, which use a count of intervals (usually seconds, or milliseconds) since some specific date and time.

      Leap seconds make it impossible to incorporate them into intervals because leap seconds are not computationally predictable.

      They are simply arbitrary announcements from the time keepers "we are adjusting the clocks by 1 second on such and such a date. We dont know when we will adjust them again.. we'll keep you posted."

      Leap seconds are not like leap years, which are easily handled because they are introduced systematically based on only the interval value.

      --
      "His name was James Damore."
  17. Re:Stupid by bickerdyke · · Score: 5, Insightful

    Why abolish it?

    You're free to CHOOSE your timescale! GPS, UTC, UT1, TIA.....

    So if leap seconds confuse you, use a timescale without them. Thats what they're for. But keep the timescale that's supposed to be in sync with earth rotation in sync with earth rotation!

    --
    bickerdyke
  18. You people ... by Nicolas+MONNET · · Score: 3, Informative

    There's a reason why the second is defined based on an atomic phenomenon. An earth day is something hilariously unreliable; it varies all the time. A near earth asteroid would measurably alter it. Today we can measure time with accuracies in the 10^-15 or something, possibly even less. And besides, you're confusing the problem of defining the base unit (second) with choosing its scale and keeping a calendar. The SI second was scaled to look like the standard second used for centuries, just defined more precisely. The problem here is that the "real" second in the historical definition (one nth of a day) varies because of astronomical phenomenons that cannot be predicted (unless you can solve the n body problem for n very large and have inventoried the whole solar system), it's not a time keeping problem.

    There's a solution to all this, it's called TAI. There is no reason not to use it but ignorance and incompetence. Every other "solution" that has been advanced here was completely, utterly stupid.

  19. That's not a solution by Nicolas+MONNET · · Score: 3, Insightful

    Clocks should strive to give the most accurate measurement, not lie to their users.

    The solution exists, it's TAI. You use TAI internally and convert to UTC (or your TZ) when displaying, similar to unix time.

  20. Re:Oracle sholuld simply fix their software... by TheRaven64 · · Score: 3, Informative

    Oracle is just being used as an example in the summary. They are not the only people to develop software that doesn't properly work with leap seconds. Check the Slashdot archives, and you'll see a story about how a lot of air traffic control software doesn't either. ATC software is safety critical - if it goes wrong, planes can crash - and it depends heavily on synchronising clocks with a variety of different places. And these are just the examples that people have already found - how much other code do you think has been tested against an event one second long that's only happened twice in the last decade?

    --
    I am TheRaven on Soylent News
  21. Quite obvious by kthreadd · · Score: 4, Funny

    Well obviously the Oracle software worked properly and noticed that the customer had not payed their license to include the extra unlicensed second of operation.

  22. Re:Poor computer clocks by Antique+Geekmeister · · Score: 3, Interesting

    No, they don't. For many low end computers, the clock chip is quite inexpensive, and they're under pretty harsh thermal conditions (dependent on layout, airflow, and heat from the CPU or other energy devouring components. The quartz crystal on your wrist doesn't experience anything like those thermal variations: this is why most computers are expected to synchronize with a master clock, such as an NTP service.

  23. Re:Well I'd say by JustOK · · Score: 3, Funny

    I'll second that. Make sure the minutes reflect that.

    --
    rewriting history since 2109