Maker Pro
Maker Pro

Time and time again (UTC leap seconds)

D

Didi

I just did a tiny NTP time read utility. NTP comes in UTC, which is in
seconds
since 1900 - OK, I did that. There are a number of years between 1972
and
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
behind
the time the wintel system finds using the same server...
I immediately tried things out without the additional UTC seconds
(just
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.

Thanks,

Dimiter
 
L

larwe

Only to discover that the time I reported so was 23 (or so) seconds
behind
the time the wintel system finds using the same server...

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.
 
D

Didi

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.

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
simpler,
I'll just do it and move on.

Thanks,

Dimiter
 
A

Andrew Smallshaw

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
simpler,
I'll just do it and move on.

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.
 
G

Guy Macon

Andrew said:
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.

Eventually we will be able to solve this problem by servoing
the rotation and orbit of the earth to our atomic clocks. :)
 
D

Didi

 Apparently the NTP time comes modified - so it is not exactly
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.

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... :).

Dimiter
 
R

Rich Grise

Eventually we will be able to solve this problem by servoing
the rotation and orbit of the earth to our atomic clocks. :)

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. )-;

Cheers!
Rich
 
C

Clifford Heath

Guy said:
Eventually we will be able to solve this problem by servoing
the rotation and orbit of the earth to our atomic clocks. :)

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.
 
N

Niklas Holsti

Clifford said:
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.

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!
 
I

Ignacio G.T.

Niklas Holsti escribió:
Save the eclipses!
Help the tides flow!

If you save the _eclipses_, the other _t_raditional _ides_ will vanish
and cease to flow...

Sorry...
 
Top