Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Software News

Extra Leap Second To Be Added To Clocks On June 30 289

hcs_$reboot writes: On June 30 this year, the day will last a tad longer — one second longer, to be precise — as a leap second is to be added to clocks worldwide. The time UTC will go from 23:59:59 to 23:59:60 in order to cope with Earth's rotation slowing down a bit. So, what do you intend to do during that extra second added to that day? Well, you may want to fix your systems. The last time a leap second was added, in 2012, a number of websites, Java and even Linux experienced some troubles. Leap seconds can be disruptive to precision systems used for navigation and communication. Is there a better way of dealing with the need for leap seconds?
This discussion has been archived. No new comments can be posted.

Extra Leap Second To Be Added To Clocks On June 30

Comments Filter:
  • Leap hour (Score:5, Funny)

    by yet another SanTiago ( 257263 ) on Tuesday January 06, 2015 @02:57PM (#48747837)

    There is a better way. Just wait several thousand years and then add one leap hour.

    • or several million years, and add a second every day!

      • Man vs Machine? (Score:5, Interesting)

        by duckintheface ( 710137 ) on Tuesday January 06, 2015 @03:07PM (#48747951)

        There are two domains to consider.... human and computer. Humans won't notice or care about sunrise being off by one second or even much more than that. Computers need exact consistency. So the solution is, as stated, to update the clocks to the actual rotation only infrequently. Everyone, man and machine, will be happy.

    • by rossdee ( 243626 )

      Just wait thousands of years and then not put the clocks forward in march

    • by Macdude ( 23507 )

      An even better way, wait several thousand years and the sun will come up at 7 am instead of 6 am.

  • Better way (Score:5, Interesting)

    by itzly ( 3699663 ) on Tuesday January 06, 2015 @02:59PM (#48747865)
    Of course, there's a better way. Just ignore the small error until it adds up to an hour, and then skip a DST transition.
    • Re:Better way (Score:5, Informative)

      by gstoddart ( 321705 ) on Tuesday January 06, 2015 @03:18PM (#48748075) Homepage

      And then over time the astronomical meaning of how we keep time goes astray.

      AM and PM mean "anti-meridian" and "post-meridian", and at noon on the day of the summer solstice, the sun should sit on the celestial meridian.

      I'm pretty sure if we did it your way, eventually the meridian (which is how we derived both navigation and time keeping) would move around, and eventually noon would be in the middle of the night.

      This stuff isn't arbitrary, it's actually based in something.

      The whole point of the leap second (etc) is to keep those things lined up. Otherwise there is no way we could keep track of things like sunrise and sunset, or when you might see a specific star.

      • Explain the, how DST works in relation to "noon" and "midnight". AM and PM are more like guidelines than actual code.

        • DST is a clear one hour offset. We know precisely what the time without the DST addition is at any given moment. Letting the time slide second-by-second until we reach the extra hour would be quite a different thing.
        • Re:Better way (Score:5, Informative)

          by TWX ( 665546 ) on Tuesday January 06, 2015 @03:54PM (#48748471)

          Explain the, how DST works in relation to "noon" and "midnight". AM and PM are more like guidelines than actual code.

          I think your use of DST was wrong, I think you meant timezones.

          Timezones break local noon/midnight by offsetting the location to an approximate less than a half-hour away, but since timezones are calcuated based on the arbitrarily-picked Greenwich, UK, really the entire planet is running on Greenwich time, with a particular significant digit adjusted to reflect distance, to approximate the natural time of the area.

          • Re:Better way (Score:5, Informative)

            by xaxa ( 988988 ) on Tuesday January 06, 2015 @06:54PM (#48750345)

            arbitrarily-picked Greenwich, UK,

            Greenwich wasn't arbitrarily picked. The only options were Paris, Berlin, London and Washington DC -- they had the necessary observatories. London was already in widest common use, and the anti-meridian falls in a convenient place (not crossing anywhere important).

      • Wait a century or so, do a Leap Minute. We won't be bothered by the silly thing if they only happen once in a lifetime, if that often.
      • by itzly ( 3699663 )
        You must have missed the part where I said to correct the error when it has grown to an hour.

        at noon on the day of the summer solstice, the sun should sit on the celestial meridian.

        Many people around the world live in a time zone that's already an hour off. What's a few more seconds/minutes ? All of China has a single time zone, and they still manage to survive.

        Otherwise there is no way we could keep track of things like sunrise and sunset, or when you might see a specific star

        You don't think we could simply adjust the calculations for sunrise and sunset ?

      • AM and PM mean "anti-meridian" and "post-meridian", and at noon on the day of the summer solstice, the sun should sit on the celestial meridian.

        I'm glad you phrased it that way. Countless times I have seen people, signs and web sites refer to times such as 12 PM or 12 AM.

        There are no such times. It's either 12 noon or 12 midnight.
        • Re: (Score:3, Informative)

          by Anonymous Coward

          And countless times I see people assume that traditional latin and/or greek roots of terms must be taken literally and dictate how they are to be used in modern times...

          Numerous national standards define midnight as 12:00 AM or 0:00 AM, and noon as 12:00 PM. But many also recommend the written usage of "12 noon" and "12 midnight" to make things clear to those that don't understand AM and PM.

      • And then over time the astronomical meaning of how we keep time goes astray.

        By that logic, the astronomical meaning of how we keep time went astray when we implemented time zones.

      • It's no big deal to add a leap second every once in a while. Most of our devices that have a time component synchronize time from a centralized source (the cell network, the internet) so you won't even notice. For the other stuff, like my microwave and coffee maker and stove, if it goes out of sync by a second every few years I won't notice because power failures are more often than that, and time only goes to hh:mm anyway.
      • Re:Better way (Score:5, Informative)

        by TheCarp ( 96830 ) <sjc.carpanet@net> on Tuesday January 06, 2015 @04:16PM (#48748759) Homepage

        > AM and PM mean "anti-meridian" and "post-meridian",

        Total nitpick, its ante not anti.

        ante- prefix meaning before
        anti - prefix meaning against

        You see it in words like "antediluvian" (before the flood).

    • UTC [wikipedia.org] doesn't do daylight savings time.

  • No, not really. Leap seconds are a known quantity, make sure your code handles it.

    Next question.

    • by itzly ( 3699663 )
      So where's the list of the future leap seconds so I can make sure my code will handle them ?
      • by msauve ( 701917 )
        Does all of your code require deterministic knowledge of all future inputs? If so, I can't see how it can provide any real utility.
        • by itzly ( 3699663 )
          No, but if the code is supposed to handle leap seconds properly, it needs to know in advance when they occur.
          • You know in advance already, they are giving you about six months advance notice. Make sure your code handles generic "leap event" with the ability to input the actual values at future, undetermined time ... but in advance of the actual leap event. I could see it requiring at least two inputs, Value change, and time to insert said time.

            Should be easy.

          • by msauve ( 701917 )
            That's already provided. [obspm.fr]

            And, before you say you need to know that before you write your code, do you also need to know in advance that "JohnQSmith/aE8&fv84%" might someday be a user's name and password? If you're writing a program which requires deterministic future time intervals, you shouldn't be using the UTC time scale.
            • by itzly ( 3699663 )
              I don't see why you would think that any program would care about the exact password somebody is going to use. On the other hand, plenty of programs keep track of time and/or do calculations based on the time. And not every program is connected to the internet, so it can download the newest update of leap seconds.
              • by msauve ( 701917 ) on Tuesday January 06, 2015 @03:48PM (#48748417)
                If it's not network connected (ntp or gps), or connected to a properly calibrated atomic clock, it's going to be off by more than a second when the next leap second rolls around, anyway.

                If you don't need time accurately sync'd to UTC, you can ignore leap seconds, so what's the problem? And if you do need time sync'd to UTC, you will need some regular external input which can include upcoming leap second info, so what's the problem?
              • If you're doing calculations on time using intervals, and one second matters to you, you should be using a raw number instead of calculating the "23:59:59" yourself. If the UTC conversion is too much, use TAI instead and be done with it:

                From http://en.wikipedia.org/wiki/International_Atomic_Time [wikipedia.org]:

                International Atomic Time (TAI, from the French name Temps atomique international[1]) is a high-precision atomic coordinate time standard based on the notional passage of proper time on Earth's geoid.[2] It is the

    • The better way is just to ignore the drift. Define UTC to unrelated to the rotation of the earth or its revolution around the sun. There have been attempts to define UTC this way but is still ongoing. Ie, there's a UT1 time zone that does this and the leap second for UTC is only to keep it within a certain range of UT1.

    • Leap seconds work perfectly well for most situations. If you need precision monotonically-increasing seconds, use TAI time (or "GPS time", which is at a fixed offset from TAI). Leap seconds keep atomic clocks and the real world reasonably synchronized; any other approach will have its own problems.
  • Better way? (Score:5, Insightful)

    by msauve ( 701917 ) on Tuesday January 06, 2015 @03:01PM (#48747891)
    "Is there a better way of dealing with the need for leap seconds?"

    Sure, use/write software which correctly handles time. Leap seconds with their current, well defined behavior, have been around for over 40 years.

    If you have software which assumes a minute is always 60 seconds, an hour is always 60, 60 second minutes, etc., you're doing it wrong.
    • Sure, use/write software which correctly handles time. Leap seconds with their current, well defined behavior, have been around for over 40 years.

      This is what I was thinking but with OS and hardware. The "slowdown" rate is a known factor. I don't see why modern system that have to be so precise don't already have this factored in. Just have them compensate for the need all the time instead of having to force the issue every few years.

      Problem solved.

      • by itzly ( 3699663 )
        The earth's rotation isn't actually a known factor. It varies. http://upload.wikimedia.org/wi... [wikimedia.org]
      • Re:Better way? (Score:5, Informative)

        by msauve ( 701917 ) on Tuesday January 06, 2015 @03:20PM (#48748107)
        What you're suggesting is a variable length second. That's what GMT was before the current UTC came along. The slowdown of Earth's rotation is NOT a known factor, it varies. Things like earthquakes [space.com] can change the period unpredictably.

        Modern UTC ticks at a predictable rate, which is useful for some sciences. Leap seconds keep it in sync with the Earth's rotation, which is useful for others. UTC with leap seconds was deliberately intended to bridge those two needs.

        If someone wants a time scale without leap seconds they shouldn't be using UTC, there are others to choose from, such as TAI or GPS.
        • The slowdown of Earth's rotation is NOT a known factor, it varies. Things like earthquakes [space.com] can change the period unpredictably.

          Yes, I suppose that would make my plan rather difficult to implement.

    • How about instead of setting the time to 23:59:60, the value 23:59:59 happens twice. When we have DST, and the time falls back an hour, we don't switch to some odd non-existant number for an hour so that we don't have overlap. We just set the clocks back to 1 AM. So all the times between 1 AM and 2 AM happen twice when switching off daylight savings. This might cause some problems. but at least it's fault tolerant in the sense that it's not going to crash because the date format wasn't as expected when
      • Instead it will crash when one event happens at 23:59:59.8 and another happens at 23:59:60.4 (old notation). In your proposed notation, there would be no way of knowing that event one happened before event two.
        In the case of DST, most systems use UTC internally, which doesn't have a notion of DST. Or said in another way, we don't adjust the base clock, we just change time zone.

      • by msauve ( 701917 )
        "How about instead of setting the time to 23:59:60, the value 23:59:59 happens twice"

        So, an event which should run once at 23:59:59 gets run twice? Or if you're logging event sequences, an event which happens later can be logged at an earlier time? I predict big issues with database sync in your future.

        When DST happens, there is no duplication of time numbering, the time scale itself changes. 1 AM EDT is not 1 AM EST.
      • How about instead of setting the time to 23:59:60, the value 23:59:59 happens twice. When we have DST, and the time falls back an hour, we don't switch to some odd non-existant number for an hour so that we don't have overlap. We just set the clocks back to 1 AM. So all the times between 1 AM and 2 AM happen twice when switching off daylight savings.

        The times between 1 AM and 2 AM don't really happen twice on the day daylight time ends, they are simply ambiguous unless daylight or standard time is specified. (In other words, you don't know which of 2 possible seconds 1:42:42 AM refers to until daylight or standard time is specified.) Similarly, your proposal would make 23:59:59 ambiguous without some additional specifier, in which case why not just use 23:59:60?

        There is no one perfect solution, which is why there are multiple time standards, including

    • by 0123456 ( 636235 )

      One of the projects I worked on spent weeks just checking that the system could handle leap seconds correctly, which required getting special firmware from the GPS manufacturer which allowed them us trigger artificial leap seconds. The spec for the communication protocol that system implemented had to have special cases purely to handle leap seconds, and someone has to be on call every time it happens just in case something bad goes wrong.

      They cause havoc around the world for minimal beneift. Those who care

    • If you have software which assumes a minute is always 60 seconds, an hour is always 60, 60 second minutes, etc., you're doing it wrong.

      Only once every 40 years or so. Not so wrong in reality, for most applications anyway.

      The alternative is pretty a pretty complex bit of programming to "do it right". Those applications that do need to be that accurate, need the complex bits of code, the bulk can just keep using the constants you learned in first grade. All this reminds me of the Y2K hoopla, which was much ado about nothing, or the DST changes of the last few decades which where rife with fear mongering for profit.

      I'd say that if your a

    • Or just don't worry about it. I work with systems where you must deal with clock drift over time and time drift across the network. So the addition of a second doesn't change much at all. The times when it matters most is with things like satellite navigation systems.

  • Then engineers build their systems so that they work with leap miliseconds, as otherwise they would fail more often. If your system fails only every 4 years and then only for a few seconds, you won't invest in fixing the problem. If the event occurs more often, then you're forced to.

  • There should be a leap second every month, followed by elimination of a second the following month. That way all code would quickly be adapted to work correctly with leap seconds.

    Then of course you have to program to handle the months you don't omit a second because you really wanted the leap second to take...

  • >> Is there a better way of dealing with the need for leap seconds?

    We just need to make each second last a very little bit longer.

  • by at10u8 ( 179705 ) on Tuesday January 06, 2015 @03:16PM (#48748059)
    A recent draft of the set of options which will be presented when the World Radio Conference votes this fall is visible at http://acma.gov.au/Industry/Sp... [acma.gov.au] This draft has options A, B, and C, but it is likely to be wordsmithed a lot before it is finished.
    • Re: (Score:2, Insightful)

      by Anonymous Coward

      I hope they don't chose option A. It's a hack. We already have a timescale that doesn't add leap seconds: TAI. Changing the definition of UTC is just a hack to fix broken systems. But there are so many other problems with the way systems handle time that it's kind of a moot point.

      Properly written software that requires continuance SI-seconds units will use TAI or if they don't need a global reference a local monotonic clock.

      Even TAI is something of a lie. Relativity tells us that time is relative, so any gl

      • by 0123456 ( 636235 )

        People need to _think_ about the function of time in their applications

        Yeah, like that's gonna happen.

        and stop pretending like it's a simple problem or that it can solved for you by tweaking international standards.

        99% of of software expects a monotomically incrementing time which has 60-minute hours and 60-second minutes. Having the detault time not meet those expectations is moronic, and potentially catastrophic in a world so reliant on computers.

  • by fche ( 36607 )

    Solution there, it seems to me, is to inhabit unchangeable-spin planets.

  • I'm pretty sure NASA would have to account for all of these additions, but do we live in the same precision world as does NASA? Do command lines like "date +%s" historically count these seconds?
  • At some point the earth will stop spinning.

    The one who will build a forecast model will know which side of the earth will be .... "sunny way up".

    Appropriate investment decisions can be made to purchase a land in the twilight zone, where is not too hot and not too cold.

    Some sources say, that earth is slowing down 1.7 milliseconds every 100 years. However the last leap second adjustment took place in 2012, http://en.wikipedia.org/wiki/L... [wikipedia.org]

    Anybody know a quick and dirty way, a good formula, that would tell us

    • by fche ( 36607 )

      "Anybody know a quick and dirty way, a good formula,"

      Why sure. We demonstrate the amazing power of DIVISION:

      24 hours
      -----------------
      1.7 ms/100 years

      = 5.0823529e+09 years

      • Ok, Can you calculate the slow down, if ajdustments were done as follows: one in 2012 next one in 2015, basically every three years.

      • According to http://en.wikipedia.org/wiki/T... [wikipedia.org]

        > If other effects were ignored, tidal acceleration would continue until the rotational period of Earth matched
        > the orbital period of the Moon. At that time, the Moon would always be overhead of a single fixed place on
        > Earth. Such a situation already exists in the Pluto–Charon system. However, the slowdown of Earth's
        > rotation is not occurring fast enough for the rotation to lengthen to a month before other effects make
        > this irrelevant: A

    • It's not going to stop spinning. What will happen, though, is the Earth will eventually become tidally locked with the Moon. The pair will continue to rotate around the barycenter. Unfortunately, the Earth and Moon may be engulfed by the expanding Sun before this happens.
  • You could use Atomic time, [wikipedia.org] which is basically UTC but without leap seconds.

  • by ScentCone ( 795499 ) on Tuesday January 06, 2015 @03:29PM (#48748209)
    First, you've got all those new solar panels absorbing photons from the sun, but only in one direction, and then you've got all of those wind farms and tidal hydro plants adding friction to things. Of course the earth is being slowed down. Every time some do-gooder plants a tree, what do you think happens? More friction. Friction slows down the planet and causes heat. Check it for yourself - try walking briskly to the fridge and back, and then try shuffling your feet on the carpet as you do the same. Heat! Slowing down! Exactly like what happens when the atmosphere has to slide over something that's in the way, like a rainforest. No matter how many coal-bearing mountains we smooth out to help with this problem, the infestation of "tiny houses" clustered around hipster-friendly towns just slows the air back down again.
  • Is there a better way of dealing with the need for leap seconds?

    Decrease the radius of the moon's orbit.

  • Will my server have "time running backwards" errors tonight? If so, I'll have problems with dovecot mail tomorrow.

  • 61s in a minute! I will definitely try to beat my best laptime on Mario Kart Wii.

    • or maybe I shall pay a visit to the closest nuclear power plant to see it explode. I was so frustrated at Y2K

  • "Is there... (Score:5, Informative)

    by Minwee ( 522556 ) <dcr@neverwhen.org> on Tuesday January 06, 2015 @03:50PM (#48748435) Homepage

    ...a better way of dealing with the need for leap seconds?"

    Well... It could be worse. The last time we let the clocks go off we lost almost two weeks trying to fix it [timeanddate.com].

    Let's just keep up with the leap seconds so that nobody has to cancel Christmas again.

  • Fix NTP (Score:5, Interesting)

    by amorsen ( 7485 ) <benny+slashdot@amorsen.dk> on Tuesday January 06, 2015 @03:55PM (#48748483)

    The main problem is the wrong handling of UTC by NTP and Unix.

    NTP is simply on the wrong time system. It is a system which is designed to accurately keep a monotonous steady time shared among millions of systems spread across time zones. It does not have any sensible way of dealing with the fact that some systems want to suddenly add a second or subtract one, just like it cannot deal with time zones or Mayan calendars. Those are simply outside its problem domain. Luckily the fix is simple: Stop handling leap seconds at all in NTP, just keep counting seconds. If you must handle it in NTP for those client systems too primitive to do it themselves, do it by transmitting the current offset between NTP time and UTC. The best solution would be to define NTP time to be TAI of course, but it will likely have to be TAI+offset to handle backwards compatibility.

    Unix again does it wrong by keeping system time in UTC rather than TAI. UTC is useful for humans but difficult for machines, it should be handled by the human interface libraries, just like time zones. Kernel time should be TAI of course. When leap seconds are inserted, systems must be updated, but that is not particularly harder than keeping the time zone files up-to-date is already. Of course it would be a lot easier if the astronomers would let us know a few years in advance rather than six months, but then the offset between TAI and UTC could exceed 0.9 seconds, and as we all know that would bring Ragnarok.

    GNU systems even have sets of time zones for precisely this reason: "POSIX" and "Right". Unfortunately it is not possible to use the "Right" time zones with current NTP.

    • Unix again does it wrong by keeping system time in UTC rather than TAI.

      Actually, that's not what POSIX does, for any definition of "keeping system time in UTC" corresponding to the ITU-R specification [itu.int], as the POSIX definition of "seconds since the Epoch" [opengroup.org] and its mapping to a struct tm doesn't allow the seconds value to be 60, which it will be during a positive leap second.

      I.e., it's even more wrong - a POSIX-compliant time_t isn't something that corresponds to TAI (as it doesn't tick forward by 1 every second of elapsed time) and you can't generate valid UTC labels (YYYY-MM-D

  • by sjames ( 1099 )

    For the vast majority of cases, leap seconds shouldn't be a problem (or even important). Just note that the clock is wrong and use the built in OS functionality to adjust the clock. (in other words, on a well maintained server, do nothing special)

    For things that need a constant time base but not a persistent one, just count the ticks and call it good.

    For the really hard cases, we probably need a time base that is simply the number of seconds from a defined base. Then maintain a simple table in the public do

  • by wonkey_monkey ( 2592601 ) on Tuesday January 06, 2015 @04:30PM (#48748925) Homepage

    Extra Leap Second To Be Added To Clocks On June 30

    It's not an extra leap second, it's just a leap second. They're already "extra" by definition.

    Yours sincerely,

    Captain Pedantic

E = MC ** 2 +- 3db

Working...