File Date/Time changed to UTC to eliminate Daylight Savings Time Issue
This commit is contained in:
parent
858bf4a7a7
commit
f5e8cca1f8
@ -91,7 +91,7 @@ namespace DataLoader
|
|||||||
title = null;
|
title = null;
|
||||||
// get the number, title, etc from the file.
|
// get the number, title, etc from the file.
|
||||||
// use the path to open the file & read the title & comment
|
// 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);
|
FileStream fs = fi.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||||
BinaryReader br = new BinaryReader(fs, System.Text.ASCIIEncoding.ASCII);
|
BinaryReader br = new BinaryReader(fs, System.Text.ASCIIEncoding.ASCII);
|
||||||
string tmpRtfFileName = Path.GetTempFileName();
|
string tmpRtfFileName = Path.GetTempFileName();
|
||||||
@ -113,7 +113,7 @@ namespace DataLoader
|
|||||||
bw.Close();
|
bw.Close();
|
||||||
tmpfile.Close();
|
tmpfile.Close();
|
||||||
WaitMS(wms); // give it some time to close the tempfile before adding section
|
WaitMS(wms); // give it some time to close the tempfile before adding section
|
||||||
File.SetLastWriteTime(tmpRtfFileName, dts);
|
File.SetLastWriteTimeUtc(tmpRtfFileName, dts);
|
||||||
}
|
}
|
||||||
return tmpRtfFileName;
|
return tmpRtfFileName;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ namespace DataLoader
|
|||||||
// exists for the rodb and with the same dts as the file.
|
// exists for the rodb and with the same dts as the file.
|
||||||
FileInfo fi = new FileInfo(fstPath + @"\ro.fst");
|
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)
|
if (rofst == null)
|
||||||
{
|
{
|
||||||
// Next read in the rofst & make the rofst record.
|
// Next read in the rofst & make the rofst record.
|
||||||
@ -71,7 +71,7 @@ namespace DataLoader
|
|||||||
//r.Close();
|
//r.Close();
|
||||||
fsIn.Close();
|
fsIn.Close();
|
||||||
// get the date time stamp, need to create the record with the file's dts.
|
// 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.
|
// Next hook the rofst to the docversion using the associations table.
|
||||||
DocVersionAssociation dva = docver.DocVersionAssociations.Add(rofst);
|
DocVersionAssociation dva = docver.DocVersionAssociations.Add(rofst);
|
||||||
@ -145,7 +145,7 @@ namespace DataLoader
|
|||||||
frmMain.Status = "Processing Image " + fname;
|
frmMain.Status = "Processing Image " + fname;
|
||||||
// if the roimage record exists, don't create a new one...
|
// if the roimage record exists, don't create a new one...
|
||||||
ROImage roImg = null;
|
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)
|
if (roImg == null)
|
||||||
{
|
{
|
||||||
@ -155,7 +155,7 @@ namespace DataLoader
|
|||||||
byte[] ab = r.ReadBytes((int)fsIn.Length);
|
byte[] ab = r.ReadBytes((int)fsIn.Length);
|
||||||
r.Close();
|
r.Close();
|
||||||
fsIn.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..
|
// see if it's already linked to the current rofst..
|
||||||
Figure figure = Figure.GetByROFstID_ImageID(rofstinfo.ROFstID, roImg.ImageID);
|
Figure figure = Figure.GetByROFstID_ImageID(rofstinfo.ROFstID, roImg.ImageID);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user