Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Nov : Daylight savings time timestamp
| Subject: | Daylight savings time timestamp |
| Posted by: | "Mike Henry" (mik..@ghosttownsoftware.com) |
| Date: | 18 Nov 2006 08:58:36 |
I have a program that copies files based on file dates: if the source file is newer than the destination file then the source file overwrites the destination. The problem is, when the clocks changed at daylight savings time the timestamps on the destination (NTFS) changed but the source (Fat32) did not. So now it wants to copy the whole source drive because the time stamps are an hour newer than the destinations.
Is there a way to stop this? Either get the uncorrected timestamp or check if DST is being applied?
I'm using Delphi 4, with standard tSearchRec, for example:
Result := FindFirst (File2, $7, Find2);
if (Result <> 0) or (Find1.Time > Find2.Time) then begin
Form1.ListBox1.Items.Add (File1);
etc...