File Date/Time changed to UTC to eliminate Daylight Savings Time Issue
This commit is contained in:
@@ -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<string> roids = new List<string>();
|
||||
string pdfTmp = MSWordToPDF.ToPDFReplaceROs(_MyDocument, roids, myItemInfo);
|
||||
|
@@ -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<string, int> myROImagesList = BuildROImagesList(myROImages);
|
||||
List<int> myROImageIDs = new List<int>();
|
||||
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);
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user