1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Time and time again (UTC leap seconds)

Discussion in 'Embedded' started by Didi, Jan 14, 2008.

  1. Didi

    Didi Guest

    I just did a tiny NTP time read utility. NTP comes in UTC, which is in
    since 1900 - OK, I did that. There are a number of years between 1972
    now which have been 1or 2 seconds longer - I found a table of them
    (in wikipedia) and did things accordingly.
    Only to discover that the time I reported so was 23 (or so) seconds
    the time the wintel system finds using the same server...
    I immediately tried things out without the additional UTC seconds
    stripped all +1 out of the source:) and there is was - precise match.

    Now what do I do? Who is correct? I'll wait another 18 minutes for
    the radio
    now to check on the hour but I am pretty sure there are people here
    who have
    done clocks using NTP and would know what I am trying to discover.


    Didi, Jan 14, 2008
    1. Advertisements

  2. Didi

    larwe Guest

    This seems to explain the phenomenon adequately. <http://
    www.cis.udel.edu/~mills/leap.html> Essentially it would appear you
    only need to insert leap-seconds that have occurred between the last
    time you went upstream for time information and the present moment.
    larwe, Jan 14, 2008
    1. Advertisements

  3. Didi

    Didi Guest

    Looks pretty much so. I located a number of UTC clocks
    on the net and they all agreed.
    Apparently the NTP time comes modified - so it is not exactly
    seconds since 1900, but seconds since 1900 excluding the leap
    seconds... Quite a mess, but since removing the table only makes it
    I'll just do it and move on.


    Didi, Jan 14, 2008
  4. This is correct. It may not be elegant but if you stop and think
    about it you'll come to understand that doing it any other way
    would soon become nightmarishly complicated. It would complicate
    simple count->wall time conversions no end in the general case,
    and all machines would either need to know about leap seconds in
    advance (not very likely in the real world) or the protocol would
    need some way of disseminating information not only about upcoming
    leap seconds, but the total number and exact positions of all
    previous leaps seconds.

    Added to that you have the need for arbitrary sized tables and you
    can see why the decision was made to fudge it slightly, particularly
    since many (most?) applications don't actually _need_ accurate
    to-the-second timing... Unix time works in a very similar way,
    although the behaviour _during_ leap seconds differs.

    In summary, yes it is a fudge, so is the whole concept of leap
    seconds and, indeed, leap years. In the end it doesn't matter how
    you were to define things: it would still be messy.
    Andrew Smallshaw, Jan 17, 2008
  5. Didi

    Guy Macon Guest

    Eventually we will be able to solve this problem by servoing
    the rotation and orbit of the earth to our atomic clocks. :)
    Guy Macon, Jan 17, 2008
  6. Didi

    Didi Guest

     Apparently the NTP time comes modified - so it is not exactly
    I agree it cannot be made much better than that, the planet rotation
    speed varying... I already made the utility being able to use also
    rfc868 style servers (they send unix time rather than UTC over a
    tcp conection rather than a UDP packet), now I'll add the ability to
    serve time and it will go into the archive.
    I guess I may have to readdress this when we manage to implement
    Guy Macons proposal to fix the Earth rotation period. Or may be
    somewhat earlier, like 2036... :).

    Didi, Jan 17, 2008
  7. Didi

    Rich Grise Guest

    Yeah, and we'll cure "global warming" and solve inflation and
    end all wars, and cure every disease there is. ;-)

    But probably not in my lifetime. )-;

    Rich Grise, Jan 17, 2008
  8. I suppose we'll have so much excess capacity in our tidal power
    generation plants, that we can switch between equatorial and polar
    plants to affect the spin. :)

    Actually, given that energy lost due to viscosity in tidal flows is
    coming from the earth-moon orbital system, I predict a future world
    (far future) where the new "impending catastrophe" is geological
    disruption (vulcanism) because our extraction of tidal power has
    decayed the moon's orbit to half what it is now. Hmmm, it's even
    possible to calculate how many joules need to be extracted for that!

    Not global warming, but global cracking :). Or is that a crackpot
    theory? :)

    Clifford Heath.
    Clifford Heath, Jan 17, 2008
  9. My understanding is that the power comes from slowing the Earth's
    rotation. The angular momentum is transferred to the Moon, which
    therefore rises to higher orbits. As the Moon's apparent diameter
    shrinks, soon there will be no more total eclipses... Save the
    eclipses! Help the tides flow!
    Niklas Holsti, Jan 18, 2008
  10. Didi

    Ignacio G.T. Guest

    Niklas Holsti escribió:
    If you save the _eclipses_, the other _t_raditional _ides_ will vanish
    and cease to flow...

    Ignacio G.T., Jan 18, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.