Slashdot Mirror


Leap Second Coming In June, 2012

Zoxed writes "IERS have just announced a leap second due at midnight, June 30th this year. Are your systems ready?" The last leap second added was at the end of 2008.

142 comments

  1. Mayans by Anonymous Coward · · Score: 5, Funny

    The *LAST* leap second occured in 2012

    1. Re:Mayans by steelfood · · Score: 1

      The end of the world timer now might be perpetually stuck at 00:01. It might throw the prediction off completely. And this only because we decided to push our clocks back by one second.

      --
      "If a nation expects to be ignorant and free in a state of civilization, it expects what never was and never will be."
    2. Re:Mayans by sadler121 · · Score: 1

      I thought the timer was perpetually stuck at 5:02 PM on the 22 April, 2011?

    3. Re:Mayans by Anonymous Coward · · Score: 0

      Winston Churchill always wondered why.

  2. Short Notice by alphatel · · Score: 3, Funny

    I demand at least 3^10x8 seconds advance warning.

    --
    When the foot seeks the place of the head, the line is crossed. Know your place. Keep your place. Be a shoe.
    1. Re:Short Notice by smi.james.th · · Score: 2

      I demand at least 3x10^8 seconds advance warning.

      FTFY

      --
      One thing I know, and that is that I am ignorant...
    2. Re:Short Notice by Anonymous Coward · · Score: 0

      You have it. It's not like they waited until June 25th for this or anything.

    3. Re:Short Notice by L4t3r4lu5 · · Score: 1

      You have 1.5*10^7 seconds warning (seconds until 30th June).

      --
      Finally had enough. Come see us over at https://soylentnews.org/
    4. Re:Short Notice by NatasRevol · · Score: 2

      Killjoy.

      3^10x8 = 472392 seconds or about 5.5 days.

      --
      There are two types of people in the world: Those who crave closure
    5. Re:Short Notice by toddestan · · Score: 1

      I demand at least 3x10^8+1 seconds advance warning.

      FTFY

      FTFY.

    6. Re:Short Notice by smi.james.th · · Score: 1

      Sorry, it just didn't look right...

      I suppose for fear of getting labelled OCD or something, he is getting slightly more than 5.5 days warning, the leap second isn't for some months.

      3x10^8 seconds on the other hand is about nine and a half years, so that's a bit more advance notice.

      --
      One thing I know, and that is that I am ignorant...
  3. I won't care by aglider · · Score: 4, Informative

    I use NTP on my systems!
    They fix the timers, I got mine fixed. Automagically!

    --
    Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
    1. Re:I won't care by Defenestrar · · Score: 1

      NTP is great if you can get it for your platform, but I can't find a Turing tape of it anywhere for my mechanical watch!

    2. Re:I won't care by Soft · · Score: 4, Informative

      Not just NTP; the reference implementation. On the machines I checked last time around, those with the reference implementation handled time correctly; those with OpenNTPD just ignored the leap second and resynchronized later. I'll check again next summer, we'll see what happens.

    3. Re:I won't care by peragrin · · Score: 2

      I have yet to find a watch that doesnt drift a couple of seconds every year anyways

      So i am in the habit of simply resetting everything when i adjust for DST.

      I know this because i set one watch to GPS time and find it loses or gains a second every month. This has proven true countless times over the decade with hundreds of watches.

      --
      i thought once I was found, but it was only a dream.
    4. Re:I won't care by mcavic · · Score: 1

      1000 ms is a pretty big drift, so I assume NTP will have to step the clock and resynchronize. I'm not too worried about it, though. :)

    5. Re:I won't care by mcavic · · Score: 1

      Actually, I believe WWVB has a leap second provision. I don't know if the NTP protocol does or not.

    6. Re:I won't care by John+Hasler · · Score: 2

      > Not just NTP; the reference implementation.

      Or Chrony.

      --
      Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    7. Re:I won't care by John+Hasler · · Score: 1

      It's provided for in the protocol and in the software. NTP (and Chrony) will simply insert an extra second.

      --
      Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    8. Re:I won't care by Anonymous Coward · · Score: 5, Funny

      I found one here: Mechanical Watch NTP Client

    9. Re:I won't care by klapaucjusz · · Score: 1

      I don't know if the NTP protocol does [have a leap second provision].

      Yes it does -- that's what the LI (Leap Indicator) field is for.

    10. Re:I won't care by ahecht · · Score: 1

      Casio Waveceptor FTW!

      http://amzn.com/B00134L9B6/

    11. Re:I won't care by Anonymous Coward · · Score: 0

      You are aware that GPS time and UTC are off by several seconds, right?

      Why would you worry about your watch gaining or losing a few seconds when even when it's "accurate" you're going to be 15 seconds ahead of most people?

      That said, as another poster said, look into a watch that syncs over radio... I prefer the Citizen Skyhawk line: https://www.google.com/search?q=citizen+skyhawk

    12. Re:I won't care by Clueless+Moron · · Score: 2

      The GPS protocol includes the UTC offset, so all GPS units report UTC time.

    13. Re:I won't care by Anonymous Coward · · Score: 0

      The pedant in me wants to remind you that you said GPS time, not "the time displayed on a GPS unit". ;)

      My real reason for this response is to inform you that not *all* GPS units do this. I have been burned in the past because different stages of pre/post processed GPS out of some units do and don't factor in the 15 seconds (granted, this was 13 seconds at the time... it was awhile ago). Since then, I always double-check for an offset when I'm mucking about with GPS and timing.

    14. Re:I won't care by Clueless+Moron · · Score: 1

      The $GPRMC sentence is required by NMEA-0183 to report UTC.

      What brand module did you find that did not do this? I'd like to be sure to avoid it...

    15. Re:I won't care by dotancohen · · Score: 3, Funny

      I have yet to find a watch that doesnt drift a couple of seconds every year anyways

      SLOW DOWN!

      --
      It is dangerous to be right when the government is wrong.
    16. Re:I won't care by Anonymous Coward · · Score: 0

      A Novatel DL4+ receiver combined with a Honeywell AG58 type IMU. I don't recall the specific stage at which the offset is not applied, but I think it may be in the raw PDC files. As I recall, by the time post-processing is complete, the correction factor IS applied, but I was mucking about in the processing stream and hit a region before it got applied. I will absolutely grant that this is a corner case, as this is not really ever going to be a typical consumer-level issue. :)

      I'm not familiar with NMEA-0183 and don't know if it applies to the sort of hardware I was using.

    17. Re:I won't care by Obfuscant · · Score: 1

      The $GPRMC sentence is required by NMEA-0183 to report UTC.

      NMEA is not "the GPS protocol." It is a protocol for transmitting all kinds of data from all kinds of devices. Depth finders, LORAN, GPS, etc.

      The GPS protocol defines what internal GPS data transmission, and that protocol uses GPS time but has information about the GPS to UTC offset.

      What brand module did you find that did not do this? I'd like to be sure to avoid it...

      I believe that the Trimble Acutime GPS receiver provides raw GPS time in its data output until the offset is known, at which time it switches to UTC. This is the GPS I have for my NTP server, and I recall there being an odd 12 or 13 second time error right after the GPS is powered on. Of course, I use a more accurate binary protocol to talk to it, not NMEA.

    18. Re:I won't care by Clueless+Moron · · Score: 1

      By "the GPS protocol" I meant what is sent OTA from the satellites, which does indeed include UTC correction. In other words, there is no excuse for a GPS module to not provide a means of giving UTC. And any GPS that produces NMEA-0183 output has no choice but give corrected UTC time.

      The binary SiRF protocol also provides UTC.

      And yes the time will be off until you get a fix, but of course you're not supposed to use the timing data until the unit does have a lock.

    19. Re:I won't care by Clueless+Moron · · Score: 1

      Ah, sounds like you've been working with lower level stuff then. Any consumer GPS module these days consists of a module smaller than one square cm with serial output that you simply have to parse (plus stuff like a 1 pulse-per-second output pin).

      NMEA-0183 is the ASCII protocol used by most marine equipment. GPSes also have a binary protocol which is quite a bit richer. Anyway, among other things they barf out your lat/lon and the date/time in UTC once per second.

    20. Re:I won't care by Anonymous Coward · · Score: 0

      NTP is nice, but it will not magically fix all the software that cannot represent a 61 second minute.

    21. Re:I won't care by Anonymous Coward · · Score: 0

      Ya want to tell me why you feel that a binary protocol is more accurate in regards to time then a text one ?? There is nothing inherently in nmea that would cause it to be less accurate.

    22. Re:I won't care by AmiMoJo · · Score: 1

      But not all GPS receivers support it as it is an optional part of the NMEA output spec or whatever binary protocol they use. As such there are plenty of devices out there with a hard coded or user settable GPS/UTC offset. That was one of the reasons why people wanted to do away with leap seconds.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    23. Re:I won't care by jonadab · · Score: 1

      I don't care about a leap second, because if my computers are all within two minutes of one another (and within five minutes or so of the correct time) they'll be more precisely accurate than pretty much any other clock in this city, including the ones at the banks.

      If they start talking about adding in any leap hours, let me know; I might have to do something about that.

      --
      Cut that out, or I will ship you to Norilsk in a box.
  4. has to corrects my code by Average_Joe_Sixpack · · Score: 0

    if (($mon == 5) && ($mday==30)) {
       $sec = $sec + 1;
    } else {
       $sec = $sec;
    }

    1. Re:has to corrects my code by MetalliQaZ · · Score: 1

      I think that would double every second for the entire day. Be more specific.

      --
      "Here Lies Philip J. Fry, named for his uncle, to carry on his spirit"
    2. Re:has to corrects my code by Anonymous Coward · · Score: 0

      else {
        $sec = $sec;
      }

      Hm.

    3. Re:has to corrects my code by Myopic · · Score: 1

      $sec = $sec + (($mon==5) && ($mday = 30));

    4. Re:has to corrects my code by Eraesr · · Score: 4, Funny

      php coders. pah.

    5. Re:has to corrects my code by Anonymous Coward · · Score: 1

      Not only that, but this bug would kick in every year on June 30.

      Also... why the else clause? A good compiler will *probably*... no make that *hopefully* optimize that away...

      Christ that guy sucks!

    6. Re:has to corrects my code by gatkinso · · Score: 2

      Well, I think we now have a good example of how NOT to code.

      --
      I am very small, utmostly microscopic.
    7. Re:has to corrects my code by mandelbr0t · · Score: 2

      Ugh. You have reminded me why I left Perl behind for a language that has strict typing.

      sec += (mon == 5 && mday == 30 ? 1 : 0);

      --
      "Please describe the scientific nature of the 'whammy'" - Agent Scully
    8. Re:has to corrects my code by gatkinso · · Score: 1

      And in 2013.... (and 2014, and 2015, and 2016....)?

      --
      I am very small, utmostly microscopic.
    9. Re:has to corrects my code by Noread · · Score: 2

      php scripters. pah.

      FTFY

    10. Re:has to corrects my code by skoval · · Score: 2

      Wait a minute. Isn't this the code that documents itself?

      --
      I choose friends for sigs
    11. Re:has to corrects my code by Tsingi · · Score: 1

      Not only that, but this bug would kick in every year on June 30.

      Also... why the else clause? A good compiler will *probably*... no make that *hopefully* optimize that away...

      Christ that guy sucks!

      I saw that too, then I thought, "It's Perl, do I really think that I know what it does?"

    12. Re:has to corrects my code by cod3r_ · · Score: 0

      the beauty of perl is that you can do things wrong but the outcome will somehow be right.. perl just knows what to do when u screw up

    13. Re:has to corrects my code by Dhalka226 · · Score: 1

      Lost an equal sign there; your code is incrementing every day in month 5 (and also every year).

    14. Re:has to corrects my code by Average_Joe_Sixpack · · Score: 4, Funny

      That's because the perl interpreter sends each script to Larry Wall for review and correction.

    15. Re:has to corrects my code by cod3r_ · · Score: 0

      hahahahah

    16. Re:has to corrects my code by Myopic · · Score: 1

      Don't make the mistake of assuming this code runs forever in a loop.

    17. Re:has to corrects my code by gatkinso · · Score: 1

      Well, it is going to have to run at least once a day in order to work.

      Which means once a day every year it is going to fuck up.

      --
      I am very small, utmostly microscopic.
    18. Re:has to corrects my code by Ossifer · · Score: 1

      Looks like May 30th to my human brain... Who's got the brain that came up with the idea of having months start at zero, but day of month start at one?!?!

    19. Re:has to corrects my code by Myopic · · Score: 1

      I accept your chiding, but don't let it rise to actual criticism. Humorous pedantry is one thing, but you don't have enough information for real pedantry. For instance, without seeing the whole program, you don't know whether the immediate previous line of code was

      if($year==2012) {

      You also don't know if this is code only run during May, June, July, August, and September of 2012, as a special process. So again, ha ha, I laugh with you for ways to make jokes about silly tidbits of code posted to an unimportant story on Slashdot, but the criticism isn't capital-V Valid.

    20. Re:has to corrects my code by Nikker · · Score: 1

      Ugh. You have reminded me why I left Perl behind for a language that has strict typing.

      sec += (mon == 5 && mday == 30 ? 1 : 0);

      umm you mean ?

      sec += ((mon == 5 && mday == 30 && hour ==0 && min == 0 && sec == 0 year == leapyear) ? 2 : 1);

      Still, that is pretty ugly but at least it works. Other wise time will only advance by 1 second every 4 years!

      --
      A loop, by its nature, continues. If that didn't make sense, start reading this sentence again.
    21. Re:has to corrects my code by Anonymous Coward · · Score: 0

      sec += ((mon == 5 && mday == 30 && hour ==0 && min == 0 && sec == 0 && year == leapyear) ? 2 : 1);

      oops

    22. Re:has to corrects my code by Anonymous Coward · · Score: 0

      Christ that guy sucks!

      You were warned by the self-description: not just "Average Joe" but also "Sixpack"... Yeah, I'd never hire him either.

    23. Re:has to corrects my code by dotancohen · · Score: 1

      Also... why the else clause? A good compiler will *probably*... no make that *hopefully* optimize that away...

      PHP is not compiled! But that code won't be run anyway, it is just taking up 21 bytes of RAM but no cycles.

      --
      It is dangerous to be right when the government is wrong.
    24. Re:has to corrects my code by Obfuscant · · Score: 1

      Who's got the brain that came up with the idea of having months start at zero, but day of month start at one?!?!

      The same guy who decided that C arrays start at 0 instead of 1.

      One of the common, if not most common, use of the month number is to look up the month name in an array so the human used is told "June" instead of "5".

      Which reminds me of my wonderful Cruz book reader, running android, which has no ability to look up the month name from the number outside the full calendar app. When I set the alarm clock, the "repeat" shows, for my weekday alarm, "8:30 on 2,3,4,5,6".

    25. Re:has to corrects my code by andy.ruddock · · Score: 1

      && year == leapyear

      Leap seconds aren't necessarily only applied in a leapyear.

      --
      God: An invisible friend for grown-ups.
    26. Re:has to corrects my code by Myopic · · Score: 1

      who's code are you quoting? you might have mistakenly replied to the wrong comment; i never mentioned leap years.

    27. Re:has to corrects my code by andy.ruddock · · Score: 1

      My bad, should have been a reply to #38599414

      --
      God: An invisible friend for grown-ups.
    28. Re:has to corrects my code by Myopic · · Score: 1

      Word. That's what I figured. But you wouldn't have been the first person on Slashdot to misquote and mischaracterize someone.

  5. Ready? by DC2088 · · Score: 1

    Of course! My systems are second-to-none. You should see what it clocks in at - not exactly a minute set of figures! That's if you have the time..

  6. A matter of time.... by Vhaldera · · Score: 3, Funny

    One small step for man; one leap second for computer systems?

    1. Re:A matter of time.... by Anonymous Coward · · Score: 0

      One small step for man; one leap second for computerkind.

  7. Listen to WWV in North America by Clueless+Moron · · Score: 4, Interesting

    On 5, 10, 15 or 20 MHz: at 00:00Z you will hear minute consisting of 61 seconds.

    If you happen to have a radio controlled timepiece, this will also be your chance to see if they handle the leap second conversion or took the lazy way out and just rely on the next time sync fix the time.

    00:00UTC June 30th 2012 is a Saturday evening in North America. What better way to celebrate a Saturday night?

    1. Re:Listen to WWV in North America by SomeoneGotMyNick · · Score: 5, Funny

      00:00UTC June 30th 2012 is a Saturday evening in North America. What better way to celebrate a Saturday night?

      Decisions, decisions....

      I was going to watch my grass grow instead, but your suggestion sounds more promising. It won't tie up the entire night for any other activities I may plan for that weekend.

    2. Re:Listen to WWV in North America by Anonymous Coward · · Score: 1

      On 5, 10, 15 or 20 MHz: at 00:00Z you will hear minute consisting of 61 seconds.

      If you happen to have a radio controlled timepiece, this will also be your chance to see if they handle the leap second conversion or took the lazy way out and just rely on the next time sync fix the time.

      00:00UTC June 30th 2012 is a Saturday evening in North America. What better way to celebrate a Saturday night?

      The sad part is, I really can't think of a better way to celebrate a Saturday night.

    3. Re:Listen to WWV in North America by Anonymous Coward · · Score: 1

      Ain't no party like a leap second party, 'cause a leap second party... is really short.

    4. Re:Listen to WWV in North America by fph+il+quozientatore · · Score: 1

      Are you sure? June 30th is Saturday, so it should be a Friday night. Unless I am miscounting some leap day in between...

      --
      My first program:

      Hell Segmentation fault

    5. Re:Listen to WWV in North America by Anonymous Coward · · Score: 0

      Yes, you are correct. June 30 is a Saturday. So in North America the second would be added on Friday, June 29 at 3pm AKST, 4pm PST, 5pm MST, 6pm CST, 7pm EST, 8pm AST, or 8:30pm NST

    6. Re:Listen to WWV in North America by spaceyhackerlady · · Score: 2

      I've listened to a couple of leap seconds on WWV. I've recorded them too. I think I need to get out more. They sound like tick...tick...tick...(silence 23:59:59)...(silence 23:59:60)...BEEP (00:00:00)...tick...tick...tick...

      ...laura

    7. Re:Listen to WWV in North America by Clueless+Moron · · Score: 1

      The leap second is at the end of June 30th. From the IERS bulletin:

      2012 June 30, 23h 59m 59s
      2012 June 30, 23h 59m 60s
      2012 July 1, 0h 0m 0s

      So be sure to enjoy your extra long Saturday.

    8. Re:Listen to WWV in North America by Obfuscant · · Score: 1

      They sound like tick...tick...tick...(silence 23:59:59)...(silence 23:59:60)...BEEP (00:00:00)...tick...tick...tick...

      I'll leap right to the end of the cascade of Hellen Keller jokes::

      If a leap second fell on Hellen Keller, would she make a sound?

  8. Ridiculous government intervention by Anonymous Coward · · Score: 0, Insightful

    Anybody else getting sick and tired of the government doing crap like this? It's like when Congress decided a few years back to change the start and end dates for Daylight Savings Time. I still have VCRs and computers that change to DST on the "wrong" days now because of this garbage.

    Congress and the federal government: LEAVE THE DATE AND TIME ALONE. It's just fine without your intervention. This is why I am supporting Ron Paul in the 2012 elections -- he recognizes that there is a Constitutional role for the federal government. And screwing around with people's clocks is not in the Constitution.

    1. Re:Ridiculous government intervention by gatkinso · · Score: 1

      Hmm perhaps there are these things "things" such as computers, atomic clocks, disciplined oscillators, what have you, that simply do not jibe with Pope Gregory's calendar?

      Just maybe?

      Oh for fucks sake why did I even reply?

      --
      I am very small, utmostly microscopic.
    2. Re:Ridiculous government intervention by Anonymous Coward · · Score: 0

      Pope Gregory has just issued a papal bull. You are to go to hell.

    3. Re:Ridiculous government intervention by vikingpower · · Score: 1

      Oh for fucks sake why did I even reply?

      I thought the same thing, after seeing that the 1-level-up post came from an AC. SIGH

      --
      Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
    4. Re:Ridiculous government intervention by Eunuchswear · · Score: 1

      Replying to undo mod - tried to do "funny" but saw some paultard had already done "insightful". WTF!

      --
      Watch this Heartland Institute video
    5. Re:Ridiculous government intervention by Guy+Harris · · Score: 1

      Hmmm, mildly clever troll? Or just further proof that Ron Paul is supported by really stupid people?

      Poe's law strikes again. (My vote is that the answer to the first question is "yes".)

  9. on second of my life by cod3r_ · · Score: 0

    that i wont get back.. tho i lost like 30 seconds of my life reading this story and commenting..

    1. Re:on second of my life by Antarius · · Score: 2

      Such a pity you didn't invest that extra second in checking your spelling and grammar. =p

  10. Americanocentricism speaks again ! by vikingpower · · Score: 2
    IERS stands for INTERNATIONAL Earth Rotation and Reference System.

    Has NOTHING AT ALL to do with the US government. Pah !

    --
    Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
    1. Re:Americanocentricism speaks again ! by ae1294 · · Score: 1

      IERS stands for INTERNATIONAL Earth Rotation and Reference System.

      Meanwhile, At Stately Mel Gibson Manner..... GEMMA BACK MY SECOND!

  11. It's a hassle, but a tiny one... by ElVee · · Score: 4, Interesting

    Leap seconds are a tiny bit of problem when you have to time-stamp transactions coming in from all over the globe and keep them in date/time order. Some OSes don't support leap seconds, which complicates matters. We have the procedures documented from the last time this happened in 2008, but, of course, we've changed OS, DB and message queue vendors since then, so nothing applies anymore.

    Time to spin up a new project and pay some high-priced consultants a lot of money to rewrite the procedures documentation yet again. I suspect we'll take the coward's way out and shut down processing for a minute before until a minute after and resync the clocks in the interim.

    That will, of course, be charged to our SLA downtime, which will affect everyone's performance reviews at the end of the year. All this for a single goddamn second.

    --
    - Pithy comment goes here.
    1. Re:It's a hassle, but a tiny one... by mandelbr0t · · Score: 2

      I suspect we'll take the coward's way out and shut down processing for a minute before until a minute after and resync the clocks in the interim.

      This was how I figured transaction processing would be handled. It sucks that you have to pay high-priced consultants to get that answer; plenty of people would give it to you for free.

      That will, of course, be charged to our SLA downtime

      I didn't consider this aspect. Thinking about it makes me realize just how stupid a leap second is. A lot of transaction processing requires >99.999% uptime, and even that two minutes (assuming everything goes perfectly smoothly) is expensive. Couldn't they be accumulated and have an extra leap year once every 86400 years?

      --
      "Please describe the scientific nature of the 'whammy'" - Agent Scully
    2. Re:It's a hassle, but a tiny one... by Anonymous Coward · · Score: 1

      No. Leap days correct rotation of the Earth with its revolution. Leap seconds have an entirely different purpose, correcting atomic time based on caesium with the rotation of the Earth.

      There is however International Atomic Time which doesn't use leap seconds, so if you are so desperate to avoid them, you can set your servers to that instead of UTC, and convert for display if needed.

      In any case, apparently they are "voting" on whether to continue leap seconds in UTC, with results expected by 2017, so you may get your wish.

    3. Re:It's a hassle, but a tiny one... by eh2o · · Score: 1

      Leap seconds are not stupid, basing a time scale on the rotation rate of an unstable object is stupid.

    4. Re:It's a hassle, but a tiny one... by petermgreen · · Score: 1

      Some OSes don't support leap seconds, which complicates matters.

      Both unix and windows use time formats that assume there are 86400 seconds in a day. There may be papered on support for leap seconds but I wouldn't want to rely on it without extensive testing of the application/OS combination in question :(.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    5. Re:It's a hassle, but a tiny one... by petermgreen · · Score: 1

      Afaict both windows and unix use core time formats that assume 86400 seconds in a day and simply cannot represent leap seconds. So even if leap second support is present in the OS it will be papered on and I wouldn't want to rely on it without extensive testing :(

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    6. Re:It's a hassle, but a tiny one... by John_Sauter · · Score: 1

      ...That will, of course, be charged to our SLA downtime, which will affect everyone's performance reviews at the end of the year. All this for a single goddamn second.

      If you are concerned about your SLA, fix your software so it handles leap seconds correctly. You can test your fixes by hacking NTP to insert a positive or negative leap second at the end of every minute. When you get it working, you will have a competitive advantage over everyone who has to shut down.

    7. Re:It's a hassle, but a tiny one... by Anonymous Coward · · Score: 0

      Maybe having an SLA that doesn't include provisions for leap second outages, when you know there will be leap seconds, on a service valuble enough that leap-second accuracy and 5 nines uptime, and related payouts for the downtime, is in fact, the stupid thing?

      hmm.

      yeah right - everyone else should adjust their entire (more accurate) method of timekeeping because you have a bad contract.

      That makes perfect sense.

      Why dont I email the NIST, ITU, NOAA, etc and everyone else that cares about these things and get them to change this for you?

    8. Re:It's a hassle, but a tiny one... by Anonymous Coward · · Score: 0

      It's not stupid when most of human activity depends on the sun being in the sky.

    9. Re:It's a hassle, but a tiny one... by Ly4 · · Score: 1

      I think the original poster's problems are on a scale much larger than 'fix your software'. He/she is getting data from multiple, disparate systems, and probably does not have any way to tell if a given source supports leap seconds or not. Without that info, there really isn't a fix available.

    10. Re:It's a hassle, but a tiny one... by Anonymous Coward · · Score: 1

      I suspect we'll take the coward's way out and shut down processing for a minute before until a minute after and resync the clocks in the interim.

      This was how I figured transaction processing would be handled. It sucks that you have to pay high-priced consultants to get that answer; plenty of people would give it to you for free.

      Read more carefully - the poster said he needed the consultants to write the detailed procedures, not give him the basic design. Considering how complex the system apparently is, getting a correct procedure is probably worth some money.

    11. Re:It's a hassle, but a tiny one... by Ly4 · · Score: 1

      Some quick notes.

    12. Re:It's a hassle, but a tiny one... by Guy+Harris · · Score: 1

      Both unix and windows use time formats that assume there are 86400 seconds in a day.

      Actually, both UNIX and Windows have two time formats:

      • the one that is more-or-less a count of second-or-sub-second intervals since a fixed time in the past;
      • the one that's year/month/day/hour/minute/second/maybe fractions of a second.

      Amusingly:

      • for the first of them, the UNIX one ("Seconds Since the Epoch" or time_t/struct timeval/struct timespec etc.) explicitly says, in effect, the clock freezes during positive leap seconds and jumps ahead extra fast during negative leap seconds, and the Windows one (FILETIME) just says "the number of 100-nanosecond intervals since January 1, 1601 (UTC)", so the UNIX one explicitly does weird stuff about leap seconds and the Windows one doesn't;
      • for the second of them, the UNIX one (struct tm) is, at least in the C standard, explicitly specified so as to allow at least one leap second (the tm_sec field can have values from 0 to 60, not just from 0 to 59), whilst the Windows one (SYSTEMTIME) is explicitly specified as not to allow positive leap seconds (the wSecond field is "The second. The valid values for this member are 0 through 59.").

      In both cases at least some code will get behavior during positive leap seconds other than "time progresses at a rate of one second-length tick per second, and the clock goes from 23:59:59 to 23:59:60" - one or the other of those will be violated on UN*X systems that actually do what the Single UNIX Specification says and on Windows systems that actually do what the MSDN documentation says.

    13. Re:It's a hassle, but a tiny one... by Guy+Harris · · Score: 1

      Afaict both windows and unix use core time formats that assume 86400 seconds in a day and simply cannot represent leap seconds.

      See the response to your other post on this for details.

    14. Re:It's a hassle, but a tiny one... by John_Sauter · · Score: 1

      I think the original poster's problems are on a scale much larger than 'fix your software'. He/she is getting data from multiple, disparate systems, and probably does not have any way to tell if a given source supports leap seconds or not. Without that info, there really isn't a fix available.

      By hacking NTP to introduce frequent leap seconds, he can discover how each source handles leap seconds, and develop workarounds for each source he cannot fix. For example, if a particular source sits at 23:59:59 for two seconds, he might recognize that and write a filter or post-processor to convert the second second to 23:59:60 in messages received from that source.

    15. Re:It's a hassle, but a tiny one... by Ly4 · · Score: 1

      Scale is still a problem ... for every source, s/he'll have to

      • - move them into test mode
      • - change their NTP source
      • - run the test
      • - undo the configuration changes
      • - hope the system doesn't change between the test and the time they need the result.

      Chances are many of the source systems belong to customers, suppliers and other third parties. Coordinating the testing would be complicated. Tracking the configuration would be even more complicated.

      It'll be a lot cheaper for him to take a couple of minutes of outage every few years.

    16. Re:It's a hassle, but a tiny one... by John_Sauter · · Score: 1

      Scale is still a problem ... for every source, s/he'll have to

      • - move them into test mode
      • - change their NTP source
      • - run the test
      • - undo the configuration changes
      • - hope the system doesn't change between the test and the time they need the result.

      Chances are many of the source systems belong to customers, suppliers and other third parties. Coordinating the testing would be complicated. Tracking the configuration would be even more complicated.

      It'll be a lot cheaper for him to take a couple of minutes of outage every few years.

      It's not quite that bad. You need a test version of your system anyway, so you can make changes without risking bringing down the production system. You hack NTP for the test system as a whole and observe what breaks. You fix problems and re-test, just as you do for any modification, until the test sytem functions correctly. You then copy those changes to the production system.

      When a new version of an external component changes, you verify that it works using your test system. You would do this even if you were not worried about leap seconds. However, now that you have the hacked version of NTP available, you also test for leap seconds handling. If you find a new leap seconds problem you work around ir and/or report it to your vendor, just as you do with any new bug that you find.

      Yes, it will probably be cheaper to take a couple of minutes of outage every few years. However, you now have an advantage over your competition that can be exploited by your marketing department. If a customer is seriously interested in maximizing his up time, he will have a "leap seconds" box to check off on his RFP. If you are the only one who can check it off, you can charge higher rates.

    17. Re:It's a hassle, but a tiny one... by petermgreen · · Score: 1

      Actually, both UNIX and Windows have two time formats:

              the one that is more-or-less a count of second-or-sub-second intervals since a fixed time in the past;
              the one that's year/month/day/hour/minute/second/maybe fractions of a second.

      They do but my understanding was that the former was the internal format while the latter was mostly for display.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    18. Re:It's a hassle, but a tiny one... by Guy+Harris · · Score: 1

      Actually, both UNIX and Windows have two time formats:

      the one that is more-or-less a count of second-or-sub-second intervals since a fixed time in the past; the one that's year/month/day/hour/minute/second/maybe fractions of a second.

      They do but my understanding was that the former was the internal format while the latter was mostly for display.

      In most if not all UN*Xes, that's true. In modern Windows systems, it might be true, but I'm not sure; the fact that the "mostly for display" format is called SYSTEMTIME and the other format is called FILETIME, and that the call to get the former is GetSystemTime() and the call to get the latter is GetSystemTimeAsFileTime(), may or may not be significant, but they do at least seem to suggest that the "mostly for display" format is thought of as the Real System Time.

    19. Re:It's a hassle, but a tiny one... by Anonymous Coward · · Score: 0

      The second is not based on the rotation of the Earth. Furthermore, there are several existing timescales that do not include leap seconds (GPS and TAI for example). Why not just use them for things that need that level of time accuracy? For the rest of us that want to keep time sync'd to the sun, let us keep UTC.

  12. Great... by Anonymous Coward · · Score: 0

    ...I suppose this is going to throw off my mayan calendar?... :(

  13. Excellent excuse by PPH · · Score: 2

    "Officer. The reason I was driving so fast is that I was trying to adjust my watch using relativistic time dilation."

    --
    Have gnu, will travel.
    1. Re:Excellent excuse by XxtraLarGe · · Score: 1

      Wouldn't that cause your car's clock to slow down?

      --
      Taking guns away from the 99% gives the 1% 100% of the power.
    2. Re:Excellent excuse by Anonymous Coward · · Score: 0

      not if you ride in circles counterclockwise

    3. Re:Excellent excuse by omnichad · · Score: 1

      But if you go around the earth fast enough BACKWARDS, time reverses - and you can reconcile that leap second with your watch.

    4. Re:Excellent excuse by Anonymous Coward · · Score: 0

      For analog watches, you'd only have to slow them down almost a day or almost 12 hours. For digital ones, it depends on how many years they support until they flip over. It might take a while. Guess I'll have to do more speeding.

    5. Re:Excellent excuse by Anonymous Coward · · Score: 0

      Maybe if we all drive west fast enough, we'll speed the rotation of the earth to counteract the need for the leap second?

    6. Re:Excellent excuse by Anonymous Coward · · Score: 0

      If we push the earth away from the sun a bit we can add a whole week and declare it Robot Party Week.

    7. Re:Excellent excuse by Anonymous Coward · · Score: 0

      If you could drive that fast, by the time the cops pulled you over you would be out of their jurisdiction
      And probably off the planet too

    8. Re:Excellent excuse by timmy.cl · · Score: 1

      And when we all brake we'll restore the energy back into the earth. At least what the air friction left us with. And, again, the air itself moving and then "braking" will probably destroy our purpose.

  14. I work in a corporate environment by clickclickdrone · · Score: 5, Funny

    I need a lot more warning than this! We won't even be able to have the meeting in time to decide who to invite to the pre-project inception meeting.

    --
    I want a list of atrocities done in your name - Recoil
  15. white men by stoolpigeon · · Score: 1

    will be screwed

    --
    It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    1. Re:white men by Guy+Harris · · Score: 1

      will be screwed

      ...because they're the ones who believe all the "2012 is the end of the world" crap. I suspect most folks of Mayan ancestry either don't know about the 2012 hype and don't care, don't know about the Long Count rollover and don't care, or do know about it and understand it's just some part of the calendar rolling over, not some end-of-the-world crap.

    2. Re:white men by stoolpigeon · · Score: 1

      It's a joke. "leap" second - white men can't jump. get it?

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
  16. Rumor of abolishing leap seconds just two days ago by methamorph · · Score: 1

    Two days ago there were several articles stating that leap second might be abolished: http://www.scientificamerican.com/podcast/episode.cfm?id=leap-seconds-may-disappear-12-01-02 "This month the International Telecommunication Union will consider a proposal to abolish leap seconds."

  17. Party time by ddd0004 · · Score: 1

    Yes!! An extra second for drinking.

  18. Who is Leap? by Anonymous Coward · · Score: 1

    Who is this "Leap"? Why is his second coming so important?

  19. UTC and leap seconds (rant) by Anonymous Coward · · Score: 1

    Hey, did you think gettimeofday returned the number of seconds since the epoch? That a call to gettimeofday would return a value >= to the last call? Well, it doesn't, because it's based on UTC, which is defined as seconds since the epoch, minus leaps seconds.

    As a result, a value returned by gettimeofday does not refer 1:1 to a point in time, and the clock will skip a second backwards at random moments (leap seconds happen when IERS says so).

    I mean, you could put the leap second logic in the same place timevals are converted to a user-displayable format, like timezones, DST and, i don't know, leap YEARS, but NO, lets be absolutely retarded and break every program in the world that dares to make the assumption that time moves forward. There is also no other way to get the unix time.

    Most people don't even know about it, which results in bugs (there was a story about that earlier), but honestly, I consider the systems that work like this broken and not the applications.

    1. Re:UTC and leap seconds (rant) by Guy+Harris · · Score: 1

      Hey, did you think gettimeofday returned the number of seconds since the epoch? That a call to gettimeofday would return a value >= to the last call? Well, it doesn't, because it's based on UTC,

      It's only "based on UTC" to the extent that the definition of "Seconds Since the Epoch" speaks of "Coordinated Universal Time name"; the formula to compute a "Seconds Since the Epoch" value from a "Coordinated Universal Time name", meaning year-month-day hour:minute:second expressed as a struct tm, can return the same value for two different Coordinated Universal Time names corresponding to different instants in time, so "Seconds Since the Epoch" is not actually a count of the number of seconds that have elapsed since the Epoch.

      I.e., don't blame the definers of UTC for this, blame the definers of POSIX for this.

      which is defined as seconds since the epoch, minus leaps seconds.

      UTC isn't defined as seconds since anything. That's the definition of "Seconds Since the Epoch". Perhaps the POSIX spec should have called it "Seconds Since the Epoch, Except For Positive Leap Seconds", or something such as that.

      As a result, a value returned by gettimeofday does not refer 1:1 to a point in time, and the clock will skip a second backwards at random moments (leap seconds happen when IERS says so).

      It's more like "will freeze for a second at random moments", but, yeah, that's true, assuming whatever generates gettimeofday() values takes leap seconds into account. ("Whatever generates gettimeofday() values" includes not only the low-level time-of-day clock but any NTP etc. code that adjusts that clock, so it may well do so if you're using NTP.)

      I mean, you could put the leap second logic in the same place timevals are converted to a user-displayable format, like timezones, DST and, i don't know, leap YEARS,

      Not only could you do that, the folks doing the Olson time zone code and database DID do that quite a while ago (well over a decade ago, possibly over two decades ago - I could go check my copy of the tz mailing list to see when we first started talking about leap seconds); said code is quite capable of converting a count of seconds that have (or will have) elapsed since the Epoch into a Coordinated Universal Time name for any time in the past and for any time in the future happening before a not-yet-announced leap second. If it's handed a time in the future and, at some point in the future before then, a leap second is announced some time before that time in the future, the value would be wrong, but, well, if you need that UTC name for some purpose that involves actually displaying the UTC name for the time of some future event, that's life - the UTC name for an event that occurs N seconds after the Epoch is not guaranteed to be known until less than eight weeks remain until that event, so if you've told somebody a UTC name for that event eight or more weeks in advance, you might have to go apologize and correct later if the IERS drops a leap second in your path.

      The Olson code is also capable of converting UTC names back into counts of seconds that have (or will have) elapsed since the Epoch. And, yes, if it's handed a time in the future and, at some point in the future blah blah blah, it can give you a time_t that ultimately is wrong, but if, say, you're using this to arrange for something to happen at some point in the future, either 1) that something is ultimately known to be N seconds in the future, in which case there's no need to be dicking around with UTC names or 2) it's ultimately known to happen at XXXX-XX-XX HH:MM:SS, in which case, well, if a leap second gets dropped in your path, the "when" for that event is going to change because the instant of time to which XXXX-XX-XX HH:MM:SS refers is going to change, so you'll have to reschedule the event.

  20. Parse error... by Simon+Brooke · · Score: 1

    Is that ((leap second) coming) or (leap (second coming))?

    There's a significant difference!

    --
    I'm old enough to remember when discussions on Slashdot were well informed.
    1. Re:Parse error... by Anonymous Coward · · Score: 0

      Jesus Leapt

  21. OpenNTPD by klapaucjusz · · Score: 4, Informative

    OpenNTPD just ignored the leap second

    OpenNTPD has clearly been written by someone who doesn't understand NTP. For example, it advertises incorrect root delay and disperson values, which can cause clients to fail to achieve a majority vote, or to pick the wrong peer to synchronise against. (Earlier versions were even worse, they advertised themselves as being at stratum 0, which could cause synchronisation loops; this has thankfully been fixed, but it doesn't inspire much confidence in the authors' competence.)

    I've also found OpenNTP to fail to regulate the local clock on dodgy hardware (it would oscillate wildly, with an amplitude of 3 seconds or so), in situations where the reference ntpd coped just fine.

    Folks, do yourself and everyone a favour -- run the reference NTP, run chrony, heck, run some SNTP client, but please avoid OpenNTPD.

    1. Re:OpenNTPD by Anonymous Coward · · Score: 4, Informative

      I have written most of OpenNTPD. Besides a lot of other stuff.

      And to be honest, I am sick and tired of wasting energy on each and every unfounded accusation someone posts somewhere. So I won't go into detail.

      First of, portable or native OpenNTPD (native = the one that comes with OpenBSD)? That is a drastic difference, not just because the portable is ancient (if anyone cares, please maintain the portable, I'll happily put it up. And not just promises, I got a lot of them).

      Then, looking at ntpd alone doesn't cut it. OpenNTPD uses a different approach than most (all?) others, it leaves the timekeeping to the kernel where it belongs. And we adjusted the kernel subsystem for it on OpenBSD.

      and just one thing i want to pick out of the unfounded accusations:
      "I've also found OpenNTP to fail to regulate the local clock on dodgy hardware"
      that isn't OpenNTPD failing, that is your system's adjtime(2) failing.

      And now excuse me please, I prefer to spend my free time on writing code or with my friends.

    2. Re:OpenNTPD by Anonymous Coward · · Score: 0

      hmm, second trial, seems like my first comment didn't make it, i usually don't spend time on slashdot.

      I wrote most of OpenNTPD. And a lot of other stuff. So i won't go into detail here.

      I am sick and tired of replying to unfounded accusations someone posts somewhere. talk is cheap. if you cared you had sent diffs. but then you had to actually read the code.

      first of, portable or native (=the one that comes with OpenBSD)? That is a vast difference, and not just because the portable is ancient (lack of maintainer, feel free to jump in).

      just looking at ntpd itself doesn't cut it anyway. OpenNTPD uses a different approach than most (all?) others, it leaves timekeeping to the kernel where it belongs. We adjusted the kernel side subsystem on OpenBSD.

      just one point i want to pick out:
          "I've also found OpenNTP to fail to regulate the local clock on dodgy hardware"
      that is not OpenNTPD failing, that is your system's adjtime(2) failing.

      and now excuse me please, i prefer to spend my free time on writing code or with my friends.

      henning

    3. Re:OpenNTPD by Anonymous Coward · · Score: 0

      Your inability to figure out how a commenting system works gives me great reason to trust your product.

    4. Re:OpenNTPD by klapaucjusz · · Score: 4, Interesting

      have written most of OpenNTPD.

      And you admit it?

      I am sick and tired of wasting energy on each and every unfounded accusation someone posts somewhere.

      Please show me where the OpenNTPD code computes the dispersion and root delay that it sends to clients, and I will retract my claim.

    5. Re:OpenNTPD by mrcaseyj · · Score: 1

      OpenNTPD was significantly more stable if I recompiled the kernel for pentium instead of 386. It was just a few milliseconds improvement in stability, but it was a clear difference. In the kernel config file there was simply a few consecutive lines labeled something like 386 486 586 686. I did nothing but commented out all but the 586 or 686 line and recompiled. This was about six years ago though, so I don't know if it's still an issue. I'm sorry I didn't subit a report back then. I meant to. Thanks for developing OpenNTPD. I don't get the impression that David Mills is concerned enough about security.

  22. YOU ARE ALL EDUCATED STUPID! by Thud457 · · Score: 1

    wat, no luv for Gene Ray all up in this thread?!!! For shame.
    I never did understand what irradiating genetic material had to do with the natural timeframe of reality, but then, I'm not one of dem there big brains with a website on teh intarwebs.

    --

    the preceding comment is my own and in no way reflects the opinion of the Joint Chiefs of Staff

  23. breaking "time is an arrow" needed for FTL travel by Anonymous Coward · · Score: 0

    > but NO, lets be absolutely retarded and break every program in the world that dares to make the assumption that time moves forward.

    Unfortunately, we no longer can assume this now that we see faster-than-light transport may be on the horizon (viz. Tevatron experiments).

  24. Struggling with the title by oldmac31310 · · Score: 1

    It took me a few seconds to figure out the title. At first I thought we were supposed to jump for joy that Jesus was making a comeback in June. Oh I don't know...which is more exciting?

    --
    http://www.acetonestudio.com
  25. CLOCK_MONOTONIC by Anonymous Coward · · Score: 0

    Yes, indeed. The gettimeofday() function should be used only when you need the time of day. If you actually don't care what time of day it is, but just want to measure the length of time between two events, you need a different time source.

    man 2 clock_gettime

                  CLOCK_MONOTONIC
                                Clock that cannot be set and represents monotonic time since
                                some unspecified starting point.

                  CLOCK_MONOTONIC_RAW (since Linux 2.6.28; Linux-specific)
                                Similar to CLOCK_MONOTONIC, but provides access to a raw hard
                                ware-based time that is not subject to NTP adjustments.

    Since the whole idea of CLOCK_MONOTONIC is that it is a time source unaffected by time changes, I assume that the "NTP adjustments" mentioned are merely adjustments to the clock speed rather that non-linearity introduced by changes to the system time. In other words, the difference is that CLOCK_MONOTONIC gives you seconds that are always exactly one second long to the precision that NTP allows, while CLOCK_MONOTONIC_RAW gives you seconds which may run too fast or too slow depending on your hardware, but both clocks are unaffected by changes to system time.

    1. Re:CLOCK_MONOTONIC by Guy+Harris · · Score: 1

      Yes, indeed. The gettimeofday() function should be used only when you need the time of day.

      So what do I use if I need the time of day in UTC as specified by ITU-R TF.460-6? I.e., what do I use to get the time of day in a form such that

      2 Leap-seconds

      2.1 A positive or negative leap-second should be the last second of a UTC month, but first preference should be given to the end of December and June, and second preference to the end of March and September.

      2.2 A positive leap-second begins at 23h 59m 60s and ends at 0h 0m 0s of the first day of the following month. In the case of a negative leap-second, 23h 59m 58s will be followed one second later by 0h 0m 0s of the first day of the following month (see Annex 3).

      applies, complete with the clock going from 23:59:59 to 23:59:60 to 00:00:00 the next day when a positive leap second occurs and going from 23:59:58 to 00:00:00 the next day when a negative leap second occurs?

      Hint: the answer does not involve using any API in the Single UNIX Specification. The answer might involve a combination of an API that returns a count of elapsed seconds of real time since January 1, 1970, 00:00:00 UTC - which is NOT the same as "Seconds Since the Epoch" as defined in the Single UNIX Specification, as the latter doesn't just count seconds over leap seconds - and an API that acts like the gmtime() in the Olson sample code when used with an Olson database file that includes leap seconds.

      (Note that the formula in the Single UNIX Specification's definition of "Seconds Since the Epoch" - section 4.15 in "Base Definitions" in the current version of the SUS - can give the same value for "Seconds Since the Epoch" for two different "Coordinated Universal Time names"; the formula

      tm_sec + tm_min *60 + tm_hour *3600 + tm_yday *86400 +
      ( tm_year -70)*31536000 + (( tm_year -69)/4)*86400 -
      (( tm_year -1)/100)*86400 + (( tm_year +299)/400)*86400

      will give the same value for XXXX-XX-XX 23:59:60 and {XXXX-XX-XX + one day} 00:00:00, so that the clock sticks during a positive leap second; that's why you can't turn "Seconds Since the Epoch" into what the SUS calls a "Coordinated Universal Time name" and always get the correct "Coordinated Universal Time name".)

      (And, no, CLOCK_MONOTONIC won't do it, as that's time "since some unspecified starting point", so only differences between CLOCK_MONOTONIC values are meaningful. I can has CLOCK_REALTIME_BUT_NOT_FUCKED_UP_BY_LEAP_SECOND_POSIX_CRAP?)

  26. 10 months per year by NSN+A392-99-964-5927 · · Score: 1

    Well remember when there were only 10 months per year..... I don't know what the world is coming to nowadays.

    --
    All cows eat grass!