🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10657

Re: FindFirstFile, FILETIME, and Daylight Savings

#10657
From: Andrue Cope
Date: Wed, 07 Apr 2004 08:28
55 lines
3254 bytes
On Tue, 06 Apr 2004 10:20:39 -0700, Bob Gonder wrote:

> Hmmm.. if( (DWORDLONG)OldTime == (DWORDLONG)ftCreationTime ) ?

I believe so, yes. Certainly the OS and NTFS store date/times as a single
64 bit integer. It's the number of nanoseconds since the 1.1.1601

> Yep, but it should also take the _date_ into consideration too. Since
> date is part of FILETIME, the info is available, and
> FileTimeToLocalTime should Not add DST to non-DST dates. 

[snip]

I think it's better this way. Right now our computers are suggesting we
were all at work an hour later last week. This is correct. We were. The
times reported on our systems are correctly reflecting the fact that we
have entered BST.

> Talking of forensics.. So if I murder someone at 9am last Friday, get
> to work by 10 to create a computer trail, come Monday when the cops
> see me, my computer dutifully shows my 9am alibi.

Lol. That would only stand up for ten minutes. Trust me :)

I just tried an experiment on my system and it was quite enlightening. One
of the things our tools can do is show a graph of date/times for a group of
files. In one mode it shows the amount of activity (number of files)
against date/time. If I point it at one particular directory which contains
log files you can see the point at which BST kicked in.

> > A program that never used FileTimeToLocal time would
> >not see a difference.
> 
> That's what's confusing.  I don't use anything other than CompareTime.
> 

Very odd then.

> > Modern file systems store their times in UTC, older
> 
> Including Win98, right?  (This is running on a '98se box)

Ye-es. FAT is a sticky issue. As a file system originally it stored
date/times in local time. This is because didn't have any way of dealing
with DST other than getting the user to change the time.

Windows 9x /does/ so a Windows 9x machine will generate date/times that are
UTC.

OTOH if the machine was originally running DOS (or perhaps a version of
Windows prior to 9x) and was upgraded to Windows 9x then there could be a
mixture of UTC and local time.
-- 
Andrue Cope
[Bicester UK]
Technical Details
Message-ID: <esk442igycqh.1wev74gdcq276.dlg@40tude.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <1c8170tliot8sh3tp2gfk0v61as6l3uqti@4ax.com> <ak8rt8ua80v1$.zw3u0r86c55l.dlg@40tude.net> <ma6370d3jao3sjn3craod7n6jo4eioraq8@4ax.com> <8ptgrgaex8m6$.lkys4jypdxw.dlg@40tude.net> <bnn57013vvtk88ev5p544m0tq1gbuair87@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2bff2a2748be0347
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-07 01:37:04 PST
From: Andrue Cope <no.spam@spammy.com>
Subject: Re: FindFirstFile, FILETIME, and Daylight Savings
Newsgroups: borland.public.cppbuilder.nativeapi
User-Agent: 40tude_Dialog/2.0.10.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
References: <1c8170tliot8sh3tp2gfk0v61as6l3uqti@4ax.com> <ak8rt8ua80v1$.zw3u0r86c55l.dlg@40tude.net> <ma6370d3jao3sjn3craod7n6jo4eioraq8@4ax.com> <8ptgrgaex8m6$.lkys4jypdxw.dlg@40tude.net> <bnn57013vvtk88ev5p544m0tq1gbuair87@4ax.com>
Date: Wed, 7 Apr 2004 09:28:02 +0100
Message-ID: <esk442igycqh.1wev74gdcq276.dlg@40tude.net>
NNTP-Posting-Host: 217.207.223.34
X-Trace: newsgroups.borland.com 1081326530 217.207.223.34 (7 Apr 2004 01:28:50 -0800)
Lines: 55
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail