linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@impinj.com>
To: "alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
	"fthain@telegraphics.com.au" <fthain@telegraphics.com.au>
Cc: "linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
	"a.zummo@towertech.it" <a.zummo@towertech.it>,
	"userm57@yahoo.com" <userm57@yahoo.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rtc: Don't state that the RTC holds UTC in case it doesn't
Date: Tue, 25 Jun 2019 17:16:52 +0000	[thread overview]
Message-ID: <1561483011.2343.6.camel@impinj.com> (raw)
In-Reply-To: <20190625092926.GE5690@piout.net>

On Tue, 2019-06-25 at 11:29 +0200, Alexandre Belloni wrote:
> 
> 
> Userspace is certainly adjusting the timezone after the kernel did. Can
> you run the same commands without running your init? 
> 
> On stable, you have /etc/init.d/hwclock.sh that still runs and does the
> correct thing. My understanding is that systemd also handles the TZ
> properly after hctosys (see clock_is_localtime()).
> 
> Seriously, hctosys does a really bad job at setting the system time, it
> is guaranteed to be always wrong on most platforms. My plan is still to
> try to get distros to stop enabling it and do that properly in
> userspace. This is already ok when using sysV but systemd would need a
> few changes to stop relying on it when then is no hwclock initscript.
> Unfortunately, I didn't have time to work on that yet.

hctosys is very handy in that it sets the system time before any log
messages are generated.  Either in a main boot or in an initramfs. 
Having property time-stamped log messages is very important for
managing a large deployment.

If the system time is set by some script or systemd unit, then there
will always be all the things that need to run before that script or
unit can work.  E.g., udev creating rtc device nodes, mounting /sys and
/proc, systemd generator for local file system unis, the other parts of
systemd to do that, etc. All this won't be able to log with correct
system time.



  reply	other threads:[~2019-06-25 17:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21  1:51 [PATCH] rtc: Don't state that the RTC holds UTC in case it doesn't Finn Thain
2019-06-24 19:57 ` Alexandre Belloni
2019-06-25  1:53   ` Finn Thain
2019-06-25  9:29     ` Alexandre Belloni
2019-06-25 17:16       ` Trent Piepho [this message]
2019-06-25 19:19         ` Alexandre Belloni
2019-06-25 20:27           ` Trent Piepho
2019-06-26  4:42       ` Finn Thain
2019-07-13 20:50         ` Alexandre Belloni
2019-07-14  1:17           ` Finn Thain

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=1561483011.2343.6.camel@impinj.com \
    --to=tpiepho@impinj.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=fthain@telegraphics.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=userm57@yahoo.com \
    /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).