On Thu, Jun 20, 2024 at 12:52 AM <to...@tuxteam.de> wrote:
>
> On Wed, Jun 19, 2024 at 01:01:44PM -0400, Jeffrey Walton wrote:
> > On Wed, Jun 19, 2024 at 7:09 AM Greg Wooledge <g...@wooledge.org> wrote:
>
> [...]
>
> > > I strongly disagree.  The system clock is kept on "epoch time", which
> > > is the number of seconds since midnight, January 1, 1970 UTC.
> > >
> > > The system clock doesn't have a time zone of its own.  It just gets
> > > converted to a time and date within any given time zone on demand.
> >
> > ++.
> >
> > The sharp edge is how the RTC clock is set - UTC or localtime. Also
> > see <https://wiki.debian.org/DateTime>.
>
> Please don't mix those three things, that makes them just more confusing.
>
> The original topic was the system's time zone. This hasn't anything
> to do with the RTC clock, and only peripherally with "the system's
> time zone" (of which some, me included, say "there's no such thing",
> and others disagree :)
>
> You have
>
>  - the RTC clock. This is *only* looked at at boot time, to init
>    the system clock (and when you, as an admin, do "hwclock").
>    During those operations, it's important to know which timezone
>    the RTC is in, since this one /is/ in "human format. It was
>    intended to be read and set by humans, like your kitchen clock,
>    back then.
>
>  - the system clock: it boringly counts seconds. Since Epoch.
>    Since it has't hours or minutes, let alone weeks or months,
>    time zones don't even make sense to it. Sometimes it does
>    a leap second, but experts are torn on whether this was a
>    good idea at all. Have a look at [1] for an entrance to yet
>    another deep time rabbit hole.
>
>  - timezones and stuff: those happen whenever you want to convert
>    the system clock to hours, minutes, days, and other human
>    related stuff and back.
>
> (if you have good net connectivity, reading the RTC at boot can
> be shunned completely, you don't need it anymore).

Don't forget boottime and the delta between boottime and the monotonic
clock. You'll need them to explain this:

$ TZ=America/New_York dmesg -T | head -1
[Wed Jun 19 01:50:14 2024] Linux version 6.9.4-200.fc40.x86_64 (mockbuild@d372fa
1a67e347178b7bd422ead09b96) (gcc (GCC) 14.1.1 20240607 (Red Hat 14.1.1-5), GNU l
d version 2.41-37.fc40) #1 SMP PREEMPT_DYNAMIC Wed Jun 12 13:33:34 UTC 2024

$ TZ=America/California dmesg -T | head -1
[Wed Jun 19 05:50:14 2024] Linux version 6.9.4-200.fc40.x86_64 (mockbuild@d372fa
1a67e347178b7bd422ead09b96) (gcc (GCC) 14.1.1 20240607 (Red Hat 14.1.1-5), GNU l
d version 2.41-37.fc40) #1 SMP PREEMPT_DYNAMIC Wed Jun 12 13:33:34 UTC 2024

> Please, keep those three at a safe distance

I'm not sure how you can disgorge them given they contribute to a
human readable time.

Jeff

Reply via email to