Re: problem with sntpclock

Alex Stevens <[email protected]> Tue, 9 Jul 2002 22:55:09 -0500
Newsgroups gmane.comp.lib.libtai
Message-ID <[email protected]>
On Wed, Jul 10, 2002 at 12:37:37AM +0000, Thorsten Glaser wrote:
> begin  electrogrammati illius Alex Stevens
> 
> >> Then you don't have UTC any longer. Then you have POSIXly broken
> >> so-called UTC. Change your timezone link to something in
> >> /usr/share/zoneinfo/right/ instead AND PUT THE LEAPSECONDS FILE BACK.
> >
> >Yes I do use UTC. It's you who are confused.
> >
> >In point of fact, I get the time from satellites, using an M12 board. So
> >up to 12 satellites are telling me UTC.
> 
> No. They are telling you NTP. It is (by the xntp package) interpreted as
> if it were TAI, but in fact NTP is (almost) equal to UTC.
> The Unix clock is, however, to be TAI (as per POSIX).

Oh really? I don't use xntp. Here, as elsewhere, you show a considerable
ignorance, yet your pronouncements have such an air of finality. Is that
the way you habitually interact with others on a mailing list? Or am I
simply misconstruing some form of Teutonic charm? ;)

To deal with only one issue: GPS is not broadcast in NTP, as you
say. Some systems, like GLONASS, use UTC, I think, but GPS has its own
data format (or actually more than 1, I think), and outputs much more
than just the time: ephemeris tables, etc. The card itself outputs data
in Motorola binary, although it can also do NMEA.

NTP uses the UTC timescale. That is to say, they have the same
heartbeat. NTP is based on UTC, or rather, on UTC broadcasts. Maybe it
would be more proper to say that NTP and UTC are driven by different
time constructs. You imply that NTP and UTC somehow disagree on the time
on the time or on what the time is, which is not really correct.

The following link says more about how NTP represents time and the
relation of NTP to UTC.

http://www.eecis.udel.edu/~ntp/ntp_spool/html/leap.htm


> 
> (And POSIX specifies the broken behaviour which gives you the
> "other" set of time zones).

Yes.

> 
> >Don't tell me what to do. I did try using the zoneinfo/right, and strace
> >showed that sntpclock did in fact use /etc/leapseconds.dat. Still, the
> >time was out by 22 seconds. Check the archives and read the thread, if
> >you want.
> 
> Connect to my server, tell me your IP, I say you the correct time.

I know the correct time (well, in a sense I do). The correct time is UTC.
And I have a good approximation of that. All sorts of variables do,
however, influence my concept of that time: how accurate my lat and long
data is, signal propagation, the Linux kernel (which is where PPS from
the Motorola card is handled), etc. 

> 
> >How do you know that the time you're using is in fact correct?
> 
> Because I do get it from the server which makes legal time in
> my country (Germany), it is NTP, and sntpclock correctly converts
> it to TAI; date(1) then uses libc tz functions and the "right/UTC"

No, the basis of legal time in Germany is really UTC.

But this 'TAI' you keep referring to is not different from UTC, except
insofar as leapseconds are intercalated. UTC is based on TAI. And how
a piece of software with no physical connection to any atomic clock
can convert UTC (or NTP) into the *actual* time figured from literally
hundreds of atomic clocks running in laboratories around the globe, I
leave to imaginations larger than mine.

However (as I pointed out earlier), the rate of UTC and TAI is the
same. 

So when you say that you are using TAI, you really refer to getting your
time translated from NTP (possibly), based on UTC, based on TAI.

If you think your clock is more accurate than mine, good for you. 

When all is said and done, Germany, like everyone else in the world, is
on UTC.

-- 
__________________
[email protected]
------------------

"Yeah, I'm drunk all right, and you're crazy. Tomorrow I'll
be sober, but you'll still be crazy for the rest of your life."
-W.C. Fields