File Date/Time changed to UTC to eliminate Daylight Savings Time Issue

This commit is contained in:
Rich
2011-12-02 15:56:02 +00:00
parent 858bf4a7a7
commit f5e8cca1f8
2 changed files with 6 additions and 6 deletions

View File

@@ -91,7 +91,7 @@ namespace DataLoader
title = null;
// get the number, title, etc from the file.
// use the path to open the file & read the title & comment
DateTime dts = fi.LastWriteTime;
DateTime dts = fi.LastWriteTimeUtc;
FileStream fs = fi.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
BinaryReader br = new BinaryReader(fs, System.Text.ASCIIEncoding.ASCII);
string tmpRtfFileName = Path.GetTempFileName();
@@ -113,7 +113,7 @@ namespace DataLoader
bw.Close();
tmpfile.Close();
WaitMS(wms); // give it some time to close the tempfile before adding section
File.SetLastWriteTime(tmpRtfFileName, dts);
File.SetLastWriteTimeUtc(tmpRtfFileName, dts);
}
return tmpRtfFileName;
}