supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: "cpt.arsemerica@yahoo.com" <cpt.arsemerica@yahoo.com>,
	"supervision@list.skarnet.org" <supervision@list.skarnet.org>
Subject: Re: [svlogd] / -ttt / why UTC?
Date: Thu, 06 Apr 2023 18:12:42 +0000	[thread overview]
Message-ID: <em6d775667-2984-4189-ae5a-33038b86fe75@f9605eea.com> (raw)
In-Reply-To: <1799016718.299578.1680785234404@mail.yahoo.com>

>I don't know exactly what u mean with "TAI-10".
>I guess u are refering to those 10seconds

  Yes. You cannot set your system clock to TAI, unless you want wildly
incorrect results from time() and similar system calls. Setting it 10
seconds earlier than TAI is the best you can do; and that's what the
right/ timezones expect.


>here i disagree a little bit:
>As long as the software uses glibc's time functions to break down
>"seconds since the start of 1970* to year, month, mday, hours, minutes, seconds,
>the software does not need any patches...
>Ur link is a little bit misleading or outdated in that point...

  Have you tried it?

  localtime() will work if your timezone is correctly set, yes.
  gmtime() *will not work*, because it assumes a UTC system clock.
  Programs making their own assumptions, and there are a lot of these,
will not work. Don't think everyone uses the libc; new compiled
language ecosystems such as for instance Go or Rust have their own time
libraries, and can you be certain they don't assume UTC?

  "As long as the software pays strict attention to the standards and
follows them to a T even for non-100%-cookie-cutter cases" is a very
strong hypothesis to make, even when you perform minor changes.
Changing the way the system clock counts time is NOT a minor change.


>What would be wrong about the "-tttt" (localtime time stamp) option?
>Then I would not have to build/write my own *log daemon...
>And svlogd just needs to use localtime_r(3)...

  In theory, nothing, except that it's a bad idea to timestamp logs
with local time (hello, we're in the 21st century, we manage computers
worldwide, we want logs to be shareable and mergeable across timezones).

  In practice, you're asking a maintainer to perform work that *you* 
need,
and that very few other people need. That's generally considered bad
form. The way to go about it would be to implement the functionality
yourself, and submit a patch; that said, since the last time we saw
svlogd's maintainer was four years ago in a flash, I probably wouldn't
bother if I were you.
  By recommending s6-log, I gave you the solution that requires from you
the least amount of work and the least amount of waiting.

--
  Laurent


  reply	other threads:[~2023-04-06 18:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1799590563.259018.1680775861585.ref@mail.yahoo.com>
2023-04-06 10:11 ` cpt.arsemerica.yahoo.com via supervision
2023-04-06 11:02   ` Laurent Bercot
2023-04-06 12:47     ` cpt.arsemerica.yahoo.com via supervision
2023-04-06 18:12       ` Laurent Bercot [this message]
2023-04-06 20:37         ` cpt.arsemerica.yahoo.com via supervision
2023-04-09  6:11           ` Jonathan de Boyne Pollard
2023-04-06 23:21         ` Alexis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=em6d775667-2984-4189-ae5a-33038b86fe75@f9605eea.com \
    --to=ska-supervision@skarnet.org \
    --cc=cpt.arsemerica@yahoo.com \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).