🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.development.system
Article #25

A whacky DATE bug in Linux - Problem gets crazier!

#25
From: Ron House
Date: Wed, 23 Sep 1998 00:00
69 lines
4031 bytes
Peter B. West wrote:
> Ron House wrote:
> >
> > Is it really true that DOS filesystems have the correct dates everywhere
> > in the world but in Australia? If so, the timezone files must be wrong.
> > But I don't know how to fix them.
> 
> It might be something like this:
> 
> If the hardware clock is set to the local time zone (which I think it
> has to be for Win95, at least), and /etc/sysconfig/clock is correctly
> set up, then /etc/rc.d/rc.sysinit will call /sbin/hwclock with the arg
> `--hctosys', but without the arg `--utc'.  The local time will be
> converted to UTC (GMT) and that time will be used for the system clock,
> which will be maintained by interrupts to the OS, independently of the
> hw clock.  All file timestamps will be made in UTC, and converted as
> required to local time for display.
> 
Thanks Peter. I am really starting to suspect a bug in Linux somewhere,
perhaps even in the kernel. I have now checked out all the things people
have suggested and none of them work.

Ken Yap suggested
> If you are using DOS you have to use local time in the hardware clock
> instead of GMT. Then you tell Linux to cope with that by specifing
> localtime in /etc/sysconfig/clock: UTC=false ARC=false.

This is true, but unfortunately doesn't fix the problem (my system was
already set up that way). I have also been told to try:

/sbin/clock -s

but it doesn't work. Don Collins suggested:

ln -s /usr/share/zoneinfo /usr/lib/zoneinfo

which certainly makes sense, but unfortunately didn't work. I was also
told to try

/sbin/hwclock --hctosys

which also makes sense, but didn't work.

> When reading a timestamp on a linux filesystem, the software must
> translate timestamp from UTC to local time; when reading a win95
> timestamp, it must first translate from local to UTC, then feed that
> time into the normal timestamp algorithm.  If this is not happening, the
> bug is in the vfat file system handler.  Maybe it happened with the
> introduction of FAT32 support, or maybe there are differences in the way
> win95, win98 and NT handle file timestamps, and that this is causing
> problems.

I am starting to suspect you are right, that there is a newly created
bug in here somewhere. But why am I the only person on the planet to
notice it???

My only lead at present is from Doug Moir, who suggests getting a new
version of clock. I'll do that next.

The explanation that makes most sense to me is that the kernel's
variable sys_tz is set wrongly, but I don't know how to check its value
or change it if it is wrong.

The commands date and date -u both show the right info.

-- 
Ron House            house@usq.edu.au

You can only be right if you have the courage to be wrong.
Technical Details
Message-ID: <36087C67.3313582C@usq.edu.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3601D4F7.247C8BC2@usq.edu.au> <3607ABBA.1952C377@uq.net.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5392,12de531511895886
X-Google-Attributes: gidf5392,public
X-Google-Thread: 10c696,12de531511895886
X-Google-Attributes: gid10c696,public
X-Google-Thread: 100c5f,12de531511895886
X-Google-Attributes: gid100c5f,public
X-Google-Thread: f9382,12de531511895886
X-Google-Attributes: gidf9382,public
X-Google-Thread: 102983,12de531511895886
X-Google-Attributes: gid102983,public
X-Google-Thread: faa64,12de531511895886
X-Google-Attributes: gidfaa64,public
X-Google-Thread: ff9be,12de531511895886
X-Google-Attributes: gidff9be,public
X-Google-Thread: f9b51,12de531511895886
X-Google-Attributes: gidf9b51,public
From: Ron House <house@usq.edu.au>
Subject: A whacky DATE bug in Linux - Problem gets crazier!
Date: 1998/09/23
Message-ID: <36087C67.3313582C@usq.edu.au>
X-Deja-AN: 393887589
Content-Transfer-Encoding: 7bit
References: <3601D4F7.247C8BC2@usq.edu.au> <3607ABBA.1952C377@uq.net.au>
Content-Type: text/plain; charset=us-ascii
Organization: University of Southern Queensland
Mime-Version: 1.0
Newsgroups: comp.os.linux.development.system,comp.os.linux.development.apps,comp.os.linux.setup,alt.linux,alt.os.linux,comp.os.linux,comp.os.linux.questions,aus.computers.linux