🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: A whacky DATE bug in Linux - PLEASE HELP!

#30
From: Peter B. West
Date: Tue, 22 Sep 1998 00:00
70 lines
4222 bytes
Ron House wrote:
> 
> This is my second post about this problem. I only got a few replies to
> my first, and I am reasonably certain this is a bug in Linux.
> 
> The problem:
> 
> I am having trouble with my DOS partitions. I upgraded from Red Hat 4 to
> RedHat 5.1 and since then all the datestamps on files in DOS partitions
> are 10 hours ahead of their true time when checked from within Linux. As
> I am in Queensland Australia (10 hours ahead of GMT) this is obviously a
> time zone problem. But I have checked:
> 
> Win95 says: Timezone Brisbane (GMT+10)
> Linux says: Australia/Queensland
> /etc/sysconfig/clock says UTC is false
> Both systems agree on the current time.
> 
> One person suggested this:
> 
> > I had the same problem too when i installed RH5.1. It seems there is no
> > such problem with people elsewhere
> > but in Australia.
> > What i did was to set back the time in the BIOS one day before and started
> > the installation.
> 
> I haven't tried this yet, but I have the deepest suspicion that this
> will not work. Someone else said:
> 
> > I'm fairly sure that both the "date" and the "clock" command will set
> > the kernel space timezone to match the user space one whenever they
> > set the kernel clock.
> >
> I tried it and it didn't work.
> 
> 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.

When windows creates a file, it will presumably timestamp it with the
local time, which, traditionally, is the only one that windows
understands.  There will therefore be a 10 hour difference between the
timestamps on files created at the same time by windows and linux (in
Queensland, anyway).

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.

Yours faithfully,
-- 
 __ /__   Peter B. West  p.west@uq.net.au
   /     http://www.uq.net.au/~zzpwest
  /     "Lord, to whom shall we go?"
Technical Details
Message-ID: <3607ABBA.1952C377@uq.net.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3601D4F7.247C8BC2@usq.edu.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: f9b51,12de531511895886
X-Google-Attributes: gidf9b51,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
From: "Peter B. West" <p.west@uq.net.au>
Subject: Re: A whacky DATE bug in Linux - PLEASE HELP!
Date: 1998/09/22
Message-ID: <3607ABBA.1952C377@uq.net.au>
X-Deja-AN: 393636967
Content-Transfer-Encoding: 7bit
References: <3601D4F7.247C8BC2@usq.edu.au>
Content-Type: text/plain; charset=us-ascii
Organization: Dis
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