Re: [PATCH] Add a new lstat and fstat implementation based on Win32 API
- From
Johannes Sixt <j.sixt@eudaptics.com>
- Date
- Sep 4, 2007, 11:36 UTC
- Message-ID
- <46DD433A.5040604@eudaptics.com>
- In-Reply-To
- <Pine.LNX.4.64.0709041145230.28586@racer.site>
Johannes Schindelin schrieb:
Show 7 quoted lines
> On Tue, 4 Sep 2007, Johannes Sixt wrote: >> Therefore, I've pushed out a fixup patch at the top of mingw.git's devel >> branch that converts mtime to local time > > On Linux, we compare to UTC to begin with, right? We should do that here, > too... So if time(NULL) does not return UTC on MinGW, we have to wrap > that function, too.
According to MSDN, time(NULL) returns "the number of seconds elapsed since [epoch] according to the system clock". Please don't ask me what "the system clock" is.
Reading the implementation of time(), it starts with GetLocalTime(), determines whether daylight saving is in effect, and continues with another round of timezone adjustment - mind you: _not_ a timezone reversal (!!). Doesn't this look extremely bogus?
It seems we really need a wrapper for time().
-- Hannes