www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/25/11:21:51

To: Henrik Storner <storner AT olicom DOT dk>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: 1.12.maint1, second beta
Date: Thu, 25 Aug 94 16:21:00 +0300
From: eliz AT is DOT elta DOT co DOT il

> DJ writes:
> 
> > As for timezones, all works properly if you use the minimal setting -
> > no DST fields, like this:
> > 
> > 	set TZ=est5
> 
> Sorry, but - no. stat() is still broken. I used the following bit of
> code to try this out:

Forgive me a perhaps stupid question, but how can we expect stat() under
DOS to know about TZ?  For this to work, the OS itself should know about
TZ and it should store files' timestamps in GMT, am I right here?  If I am,
then this can't be made right with DOS, which always works in *local time*.

> Well, I did some more investigation of the problems with the timestamps
> returned by stat(). The problems disappears, if go32 is recompiled with
> BC 3.1 !

Are you sure it disappears *completely*, or only for files created through
calls to C library.  What about files created outside your test program,
does their timestamp changes after you call tzset() like you expect?  The
point here is, of course, that DOS itself doesn't recognize TZ (if it did,
there would be no need to fix this in the C library, right?).

And while on this point, does anyone know where can I found the definition
of how stat() should use TZ?  Some POSIX paper, maybe?  Any site which
offers such a definition by anon ftp?  These are not academic questions:
I am very close to finishing a substitute for stat() which eliminates
many known problems of the current implementation, so I would like to
make it right.  For the timestamp of the file, I just call the functions
(mktime) from ctime.c in the library right now.  Is this enough?

	Eli Zaretskii

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019