Re: Is 'right' wrong?

Lloyd Zusman <[email protected]> Sun, 23 Jan 2005 01:37:51 -0500
Newsgroups gmane.comp.lib.libtai
Message-ID <[email protected]>
[email protected] (Paul Jarc) writes:

> Lloyd Zusman <[email protected]> wrote:
>> But that is not what happens on my machine in this case.  In this
>> scenario, there is a 22-second discrepancy between my time_t value and
>> the human-readable value.
>
> That's not a meaningful comparison.  You can compare simultaneous
> time() values from two machines, or two simultaneous "date" outputs.
> But a time_t value and the human-readable string are of two different
> kinds.

I know they are two different kinds.  But I _want_ my human-readable
string to be the same as my system clock.  I _want_ it to be 22 seconds
(currently) later than the human-readable values that most people see.

I even want to set my watch to that time.  I like the feeling of being
on "real time" instead of "fake, missing-leap-second time".  This is
purely whimsical.


>> They are 22 seconds behind what other non-leap-second-counting machines
>> say, and 44 seconds behind what leap-second-counting machines say.
>
> If you are talking about comparing different machines' time() values,
> then it appears that your machine's clock is genuinely 44 seconds
> behind where you want it to be.  Here's how to fix it:

Well, actually, I was talking about my human-readable value being 44
seconds off from the system clock of a typical, accurate,
leap-second-counting machine.


> - Make sure /etc/leapsecs.dat exists.
> - Set your timezone to a right/ zone.
> - Restart clockspeed.
> - Feed it with sntpclock/taiclock.  Feed it again later so clockspeed
>   will no longer be confused about how fast your hardware clock is.
>
> Now, when you compare your clock to other clocks, remember that yours
> may be genuinely off.  clockspeed will slowly correct it, but until
> then, you should not expect your "date" to match someone else's.  Use
> sntpclock|clockview and look at the "after" time.  *That* should match
> other systems' clocks, even if your clock is currently off.  Your
> clock will eventually come into sync.

Well, in all cases, my system clock was "correct" (consistent with other
accurate system clocks). It was the human-readable time that gave me the
discrepancies I was talking about.  Therefore, I wouldn't need to make
use of the procedure you outlined above ... which I nonetheless
appreciate.


>> Do you know of any reliable public taiclock servers?  I'd rather go
>> straight to one of those, if possible.
>
> I just started one up on taiclock.dogmap.org.  If you need seriously
> good precision, this probably isn't good enough, but it's close enough
> to set your watch.  Right now I get:
> $ sntpclock `dnsip north-america.pool.ntp.org` | clockview 
> before: 2005-01-22 23:46:03.073954000000000000
> after:  2005-01-22 23:46:03.089865999931007623

Great!  I'm going to test it now.  Thanks.

And by the way, to whomever set up north-america.pool.ntp.org: thanks!
I love how it randomly reorders the list of ip's that it returns.

And as always, Paul, I thank you for all your very helpful explanations.


-- 
 Lloyd Zusman
 [email protected]
 God bless you.