Re: Following log directories

From: Jan Braun <janbraun_at_gmx.de>
Date: Fri, 26 Jun 2020 11:24:21 +0200

John W Higgins schrob:
> I meant nothing towards s6 - but daemontools does not deal with leap
> seconds (or at least it cetainly looks that way from my foolish viewpoint).

Daemontools assumes that time(3) returns TAI-like time (seconds actually
elapsed since the epoch). That's a rather sane approach that allows to
do time calculations with complete disregard for leap seconds and time
zones. And for communication with the user, you consult tables listing
the effects of the erratic movements of the earth and politicians,
respectively. These tables are usually shipped in the "right/" tzdata
directory, used by setting e.g. TZ=right/Europe/Lisbon .

Unfortunately, POSIX mandates that time(3) returns UTC-like time instead
(arithmetic difference between the epoch and now, calculated as if leap
seconds didn't exist). That's what most systems do, also because the NTP
protocol runs on UTC, and NTP clients by default set computer's clocks
to UTC-like timestamps. The obvious disadvantage is the need to keep
leap seconds in mind when doing any calculation, or to accept being
wrong by up to 27 (as of now) seconds. And then consult tables for
politician effects only, e.g. TZ=Europe/Lisbon or equivalently
TZ=posix/Europe/Lisbon .

So yes, daemontools does not deal with leap seconds, because that's the
smart thing to do. ;)
At least if you can configure your NTP client to support that scenario.


> I was just pointing out that there is a second check which may need to be
> applied to make sure the viewer is providing the information one believes
> they are seeing.

Yes. I hope I could provice some useful/interesting background.
Cheers,
    Jan



Received on Fri Jun 26 2020 - 09:24:21 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC