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: David Laight <David dot Laight at ACULAB dot COM>
- To: "'Theodore Y. Ts'o'" <tytso at mit dot edu>, 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: Wed, 14 Aug 2019 16:26:36 +0000
- Subject: RE: New kernel interface for sys_tz and timewarp?
- References: <CAK8P3a0VxM1BkjY1D2FfHi6L-ho_NH3v3+gBu45EfpjLF5NU5w@mail.gmail.com> <CAHk-=wiO2CWONDBud4nxoPgUJN1JEewFWhHa5wAqY8G5rrTXRQ@mail.gmail.com> <20190814000622.GB20365@mit.edu>
From: Theodore Y. Ts'o
> Sent: 14 August 2019 01:06
> 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.
x86 systems are very likely to have the RTC set by the bios config.
In which case it will almost certainly get set to local time.
It is certainly the default for windows installs - I don't even know
if you have any other option.
The 'real fun' (tm) happens when a dual boot system changes from
winter to summer time.
ISTR that it is quite easy to get both (or more) OS to change the
RTC by an hour (I went home an hour early one year).
Although the x86 RTC chip has a bit defined for 'summertime', nothing
sets it (at least when I looked).
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)