diff --git a/PROMS/DataLoader/LibDoc.cs b/PROMS/DataLoader/LibDoc.cs index 598dc396..1b37f99d 100644 --- a/PROMS/DataLoader/LibDoc.cs +++ b/PROMS/DataLoader/LibDoc.cs @@ -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; } diff --git a/PROMS/DataLoader/RoFst.cs b/PROMS/DataLoader/RoFst.cs index 746ac68e..8fb4f52d 100644 --- a/PROMS/DataLoader/RoFst.cs +++ b/PROMS/DataLoader/RoFst.cs @@ -60,7 +60,7 @@ namespace DataLoader // exists for the rodb and with the same dts as the file. FileInfo fi = new FileInfo(fstPath + @"\ro.fst"); - ROFst rofst = ROFst.GetByRODbID_DTS(rodb.RODbID, fi.LastWriteTime); + ROFst rofst = ROFst.GetByRODbID_DTS(rodb.RODbID, fi.LastWriteTimeUtc); if (rofst == null) { // Next read in the rofst & make the rofst record. @@ -71,7 +71,7 @@ namespace DataLoader //r.Close(); fsIn.Close(); // get the date time stamp, need to create the record with the file's dts. - rofst = ROFst.MakeROFst(rodb, ab, null, fi.LastWriteTime, "Migration"); + rofst = ROFst.MakeROFst(rodb, ab, null, fi.LastWriteTimeUtc, "Migration"); } // Next hook the rofst to the docversion using the associations table. DocVersionAssociation dva = docver.DocVersionAssociations.Add(rofst); @@ -145,7 +145,7 @@ namespace DataLoader frmMain.Status = "Processing Image " + fname; // if the roimage record exists, don't create a new one... ROImage roImg = null; - using (roImg = ROImage.GetByRODbID_FileName_DTS(rodb.RODbID, imgname, fi.LastWriteTime)) + using (roImg = ROImage.GetByRODbID_FileName_DTS(rodb.RODbID, imgname, fi.LastWriteTimeUtc)) { if (roImg == null) { @@ -155,7 +155,7 @@ namespace DataLoader byte[] ab = r.ReadBytes((int)fsIn.Length); r.Close(); fsIn.Close(); - roImg = ROImage.MakeROImage(rodb, imgname, ab, null, fi.LastWriteTime, "Migration"); + roImg = ROImage.MakeROImage(rodb, imgname, ab, null, fi.LastWriteTimeUtc, "Migration"); } // see if it's already linked to the current rofst.. Figure figure = Figure.GetByROFstID_ImageID(rofstinfo.ROFstID, roImg.ImageID);