comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: How to cache output of the compiler aka ccache
Date: Fri, 18 Mar 2005 23:10:24 +0100
Date: 2005-03-18T23:10:24+01:00	[thread overview]
Message-ID: <87d5tw8v1r.fsf@deneb.enyo.de> (raw)
In-Reply-To: pJqdnQxLIP40rqbfRVn-uw@megapath.net

* Randy Brukardt:

> Janus/Ada doesn't have the problem with the core runtime (since the source
> isn't supplied), but sometimes a daylight saving time change will force a
> rebuild of an entire project. I've never figured out a good solution, since
> the behavior is so odd.

If I read the specification of GetFileTime correctly, this
API does indeed return values relative to UTC.  Is this not the case?

Ah, found it:

| File Times and Daylight Saving Time
| 
| You must take care using file times if the user has set the system to
| automatically adjust for daylight saving time.
| 
| To convert a file time to local time, use the FileTimeToLocalFileTime
| function. However, FileTimeToLocalFileTime uses the current settings
| for the time zone and daylight saving time. Therefore, if it is
| daylight saving time, it will take daylight saving time into account,
| even if the file time you are converting is in standard time.
| 
| FAT records times on disk in local time. GetFileTime retrieves cached
| UTC times from FAT. When it becomes daylight saving time, the time
| retrieved by GetFileTime will be off an hour, because the cache has
| not been updated. When you restart the machine, the cached time
| retrieved by GetFileTime will be correct. FindFirstFile retrieves the
| local time from FAT and converts it to UTC using the current settings
| for the time zone and daylight saving time. Therefore, if it is
| daylight saving time, FindFirstFile will take daylight saving time
| into account, even if the file time you are converting is in standard
| time.
| 
| NTFS records times on disk in UTC. [...]

<http://msdn.microsoft.com/library/en-us/sysinfo/base/file_times.asp>

If there isn't any interface to read the file time as stored on FAT,
you lose.  Apparently, there isn't one.  Great engineering.



  reply	other threads:[~2005-03-18 22:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-17 18:54 How to cache output of the compiler aka ccache i-google-iasuhdkajsh
2005-03-17 19:40 ` Robert A Duff
2005-03-17 20:04   ` Ludovic Brenta
2005-03-17 21:27     ` Marius Amado Alves
2005-03-18  1:24       ` Ludovic Brenta
2005-03-18  2:08         ` Robert A Duff
2005-03-17 19:47 ` Ludovic Brenta
2005-03-18 19:22   ` Simon Wright
2005-03-18 20:04     ` Randy Brukardt
2005-03-18 22:10       ` Florian Weimer [this message]
2005-03-19  3:25       ` Larry Kilgallen
2005-03-18  6:58 ` i-google-iasuhdkajsh
2005-03-18 13:33   ` Robert A Duff
2005-03-18 14:01     ` Vinzent 'Gadget' Hoefler
2005-03-18 14:41       ` Florian Weimer
2005-03-18 15:08         ` Vinzent 'Gadget' Hoefler
2005-03-18 16:24           ` Florian Weimer
2005-03-21  8:16             ` Vinzent 'Gadget' Hoefler
2005-03-21  8:54               ` Florian Weimer
2005-03-21 11:26                 ` Vinzent 'Gadget' Hoefler
2005-03-18  8:07 ` Martin Krischik
2005-03-18 18:50 ` i-google-iasuhdkajsh
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox