From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,206547e68a60b0e7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!feed.news.tiscali.de!news.belwue.de!LF.net!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: How to cache output of the compiler aka ccache Date: Fri, 18 Mar 2005 23:10:24 +0100 Message-ID: <87d5tw8v1r.fsf@deneb.enyo.de> References: <1111085641.211767.56950@f14g2000cwb.googlegroups.com> <877jk65a2f.fsf@insalien.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: albireo.enyo.de 1111183826 2509 212.9.189.177 (18 Mar 2005 22:10:26 GMT) X-Complaints-To: Cancel-Lock: sha1:EdVGiaLuguhEkI8Z1LGQw4l2nuU= Xref: g2news1.google.com comp.lang.ada:9613 Date: 2005-03-18T23:10:24+01:00 List-Id: * 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. [...] If there isn't any interface to read the file time as stored on FAT, you lose. Apparently, there isn't one. Great engineering.