Re: Filesystems patch for Daylight Savings Time

Kai Henningsen (kai@khms.westfalen.de)
28 Sep 1996 11:34:00 +0200


chaffee@odie.cs.berkeley.edu (Gordon Chaffee) wrote on 25.09.96 in <199609251809.LAA22753@odie.CS.Berkeley.EDU>:

> I looked into daylight savings time, and all daylight savings times that
> I could find references to had offsets of one hour. If there are any
> cases where daylight savings time has an offset different than an hour,
> please let me know.

I think there are, but I have no references.

However ...

> --- linux/fs/hpfs/hpfs_fs.c.orig Tue Feb 20 00:28:13 1996
> +++ linux/fs/hpfs/hpfs_fs.c Wed Sep 25 10:52:07 1996
> @@ -321,7 +321,7 @@
> static inline time_t local_to_gmt(time_t t)
> {
> extern struct timezone sys_tz;
> - return t + sys_tz.tz_minuteswest * 60;
> + return t + sys_tz.tz_minuteswest * 60 - (sys_tz.tz_dsttime ? 3600 : 0);
> }

I am obviously missing something here. How does the kernel get *any*
information about the timezone I'm in?

I always thought this was completely done in libc (and /etc/timezone and
...), and the kernel only dealt in GMT (or UTC, or however you want to
call it).

MfG Kai