diff --git a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs index a539dc2c..092d710b 100644 --- a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs +++ b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs @@ -729,12 +729,12 @@ namespace VEPROMS break; } FileInfo fiRofst = new FileInfo(rofstPath); - if (SelectedROFst.DTS == fiRofst.LastWriteTime) + if (SelectedROFst.DTS == fiRofst.LastWriteTimeUtc) { MessageBox.Show("ro.fst files are same for path " + rdi.FolderPath + ", import of that ro.fst will not be done"); break; } - if (SelectedROFst.DTS > fiRofst.LastWriteTime) + if (SelectedROFst.DTS > fiRofst.LastWriteTimeUtc) { MessageBox.Show("Cannot copy older ro.fst from " + rdi.FolderPath + ", import of that ro.fst will not be done"); break; diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs b/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs index 847d12c5..559872cc 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs @@ -339,7 +339,7 @@ namespace VEPROMS.CSLA.Library // using (RODb rd = RODb.Get(rdi.RODbID)) // { - // ROFst rofst = ROFst.MakeROFst(rd, ab, null, di.LastWriteTime, rdi.UserID); + // ROFst rofst = ROFst.MakeROFst(rd, ab, null, di.LastWriteTimeUtc, rdi.UserID); // // Hook this into the current docversion by replacing the rofstid field in the doc version // // association object: // dva.MyROFst = rofst; @@ -428,7 +428,7 @@ namespace VEPROMS.CSLA.Library // { // FileInfo fi = new FileInfo(imgfile); // // if the roimage record exists, don't create a new one... - // using (roImg = ROImage.GetByRODbID_FileName_DTS(rdi.RODbID, imgname, fi.LastWriteTime)) + // using (roImg = ROImage.GetByRODbID_FileName_DTS(rdi.RODbID, imgname, fi.LastWriteTimeUtc)) // { // if (roImg == null) // { @@ -439,7 +439,7 @@ namespace VEPROMS.CSLA.Library // fsIn.Close(); // using (RODb rodb = RODb.Get(rdi.RODbID)) // { - // roImg = ROImage.MakeROImage(rodb, imgname, ab, null, fi.LastWriteTime, "Migration"); + // roImg = ROImage.MakeROImage(rodb, imgname, ab, null, fi.LastWriteTimeUtc, "Migration"); // } // } // Figure figure = Figure.GetByROFstID_ImageID(this.ROFstID, roImg.ImageID); diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index 8fadf7a7..5ddae996 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -275,8 +275,8 @@ namespace VEPROMS.CSLA.Library FileStream fs = _MyFile.Create(); if (MyDocument.DocContent != null) fs.Write(MyDocument.DocContent, 0, MyDocument.DocContent.Length); fs.Close(); - _MyFile.CreationTime = _MyDocument.DTS; - _MyFile.LastWriteTime = _MyDocument.DTS; + _MyFile.CreationTimeUtc = _MyDocument.DTS; + _MyFile.LastWriteTimeUtc = _MyDocument.DTS; _Created = true; } } @@ -333,7 +333,7 @@ namespace VEPROMS.CSLA.Library cfg.Edit_Initialized = true; doc.Config = cfg.ToString(); doc.UserID = Volian.Base.Library.VlnSettings.UserID; - doc.DTS = _MyFile.LastWriteTime; + doc.DTS = _MyFile.LastWriteTimeUtc; doc = doc.Save(); List roids = new List(); string pdfTmp = MSWordToPDF.ToPDFReplaceROs(_MyDocument, roids, myItemInfo); diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ROFSTExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ROFSTExt.cs index 1dd6517e..8b876c3c 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ROFSTExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ROFSTExt.cs @@ -197,7 +197,7 @@ namespace VEPROMS.CSLA.Library // check if this rofst has been loaded, i.e. dts on file versus dts in db... // if so, just make association with docversion. - ROFst rofst = ROFst.GetByRODbID_DTS(rdi.RODbID, di.LastWriteTime); + ROFst rofst = ROFst.GetByRODbID_DTS(rdi.RODbID, di.LastWriteTimeUtc); if (rofst != null) { docver.DocVersionAssociations.Add(rofst); @@ -218,7 +218,7 @@ namespace VEPROMS.CSLA.Library { Dictionary myROImagesList = BuildROImagesList(myROImages); List myROImageIDs = new List(); - rofst = ROFst.MakeROFst(rodb, ab, null, di.LastWriteTime, rdi.UserID); + rofst = ROFst.MakeROFst(rodb, ab, null, di.LastWriteTimeUtc, rdi.UserID); // Hook this into the current docversion by replacing the rofstid field in the doc version // association object: docver.DocVersionAssociations.Add(rofst); @@ -258,7 +258,7 @@ namespace VEPROMS.CSLA.Library DirectoryInfo di = new DirectoryInfo(rdi.FolderPath); // check if this rofst has been loaded, i.e. dts on file versus dts in db... // if so, just make association to existing with docversion. - ROFst rofst = ROFst.GetByRODbID_DTS(rdi.RODbID, di.LastWriteTime); + ROFst rofst = ROFst.GetByRODbID_DTS(rdi.RODbID, di.LastWriteTimeUtc); if (rofst != null) { docver.DocVersionAssociations[0].MyROFst = rofst; @@ -275,7 +275,7 @@ namespace VEPROMS.CSLA.Library fsIn.Close(); using (RODb rodb = RODb.GetJustRoDb(rdi.RODbID)) { - rofst = ROFst.MakeROFst(rodb, ab, null, di.LastWriteTime, rdi.UserID); + rofst = ROFst.MakeROFst(rodb, ab, null, di.LastWriteTimeUtc, rdi.UserID); // Hook this into the current docversion by replacing the rofstid field in the doc version // association object: dva.MyROFst = rofst; @@ -508,7 +508,7 @@ namespace VEPROMS.CSLA.Library { FileInfo fi = new FileInfo(imgfile); // if the roimage record exists, don't create a new one... - string key = ROImageKey(imgname, fi.LastWriteTime); + string key = ROImageKey(imgname, fi.LastWriteTimeUtc); if (myROImagesList.ContainsKey(key)) { int imageID = myROImagesList[key]; @@ -522,7 +522,7 @@ namespace VEPROMS.CSLA.Library 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"); Figure figure = Figure.GetByROFstID_ImageID(this.ROFstID, roImg.ImageID); if (figure != null) return; figure = Figure.MakeFigure(rofst, roImg, null); diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ROImageExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ROImageExt.cs index 6c3681f9..a600e987 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ROImageExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ROImageExt.cs @@ -165,8 +165,8 @@ namespace VEPROMS.CSLA.Library FileStream fs = _MyFile.Create(); fs.Write(MyROImage.Content, 0, MyROImage.Content.Length); fs.Close(); - _MyFile.CreationTime = MyROImage.DTS; - _MyFile.LastWriteTime = MyROImage.DTS; + _MyFile.CreationTimeUtc = MyROImage.DTS; + _MyFile.LastWriteTimeUtc = MyROImage.DTS; _Created = true; } } @@ -196,7 +196,7 @@ namespace VEPROMS.CSLA.Library //roImage.FileName; roImage.Content = buf; roImage.UserID = Volian.Base.Library.VlnSettings.UserID; - roImage.DTS = _MyFile.LastWriteTime; + roImage.DTS = _MyFile.LastWriteTimeUtc; roImage.Save(); } #endregion diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 9401aa31..372daffd 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -1282,12 +1282,12 @@ namespace Volian.Controls.Library return; } FileInfo fiRofst = new FileInfo(rofstPath); - if (roFstInfo.DTS == fiRofst.LastWriteTime) + if (roFstInfo.DTS == fiRofst.LastWriteTimeUtc) { MessageBox.Show("ro.fst files are same for path " + roFstInfo.MyRODb.FolderPath + ", import of that ro.fst will not be done"); return; } - if (roFstInfo.DTS > fiRofst.LastWriteTime) + if (roFstInfo.DTS > fiRofst.LastWriteTimeUtc) { MessageBox.Show("Cannot copy older ro.fst from " + roFstInfo.MyRODb.FolderPath + ", import of that ro.fst will not be done"); return; @@ -1368,11 +1368,11 @@ namespace Volian.Controls.Library // if the database Ro.Fst is newer or if the files have identical DTS, // assume that they are the same file. - if (roFstInfo.DTS >= fiRofst.LastWriteTime) return false; + if (roFstInfo.DTS >= fiRofst.LastWriteTimeUtc) return false; // next see if the data is the same size, i.e. byte count of record and byte count // of file. If different sizes, the date/time stamp check will hold. - if (fiRofst.Length != roFstInfo.ROLookup.Length) return fiRofst.LastWriteTime > roFstInfo.DTS; + if (fiRofst.Length != roFstInfo.ROLookup.Length) return fiRofst.LastWriteTimeUtc > roFstInfo.DTS; // if we can't tell by the DTS or size, compare the contents. Get all of the rodb's // rofsts of the size of the file & compare bytes. If