This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: New kernel interface for sys_tz and timewarp?
- From: "Theodore Y. Ts'o" <tytso at mit dot edu>
- To: Linus Torvalds <torvalds at linux-foundation dot org>
- Cc: Arnd Bergmann <arnd at arndb dot de>, Linux Kernel Mailing List <linux-kernel at vger dot kernel dot org>, Thomas Gleixner <tglx at linutronix dot de>, John Stultz <john dot stultz at linaro dot org>, Alexandre Belloni <alexandre dot belloni at bootlin dot com>, Stephen Boyd <sboyd at kernel dot org>, Florian Weimer <fweimer at redhat dot com>, "H. Peter Anvin" <hpa at zytor dot com>, Palmer Dabbelt <palmer at dabbelt dot com>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>, Karel Zak <kzak at redhat dot com>, Lennart Poettering <lennart at poettering dot net>, OGAWA Hirofumi <hirofumi at mail dot parknet dot co dot jp>
- Date: Tue, 13 Aug 2019 20:06:23 -0400
- Subject: Re: New kernel interface for sys_tz and timewarp?
- References: <CAK8P3a0VxM1BkjY1D2FfHi6L-ho_NH3v3+gBu45EfpjLF5NU5w@mail.gmail.com> <CAHk-=wiO2CWONDBud4nxoPgUJN1JEewFWhHa5wAqY8G5rrTXRQ@mail.gmail.com>
On Tue, Aug 13, 2019 at 10:30:34AM -0700, Linus Torvalds wrote:
>
> I suspect the only actual _valid_ use in the kernel for a time zone
> setting is likely for RTC clock setting, but even that isn't really
> "global", as much as "per RTC".
As I recall (and I may or may not have been original for the original
sys_tz; it was many years ago, and my memories of 1992 are a bit
fuzzy) the only reason why we added it was because x86 systems that
were dual-booting with Windows had a RTC which ticked localtime, and
originally, the system time was fetched from the RTC in early boot,
and then when the timezone was set, the time would be warped so it
would be correct.
Trying to use this for anything else is probably a bad idea, and in a
world where we can have initrd's and reading the RTC gets done by
userspace as opposed to kernel, it probably doesn't make any sence to
keep it.
Cheers,
- Ted