Timon
2009-05-28 10:13:01 UTC
hi all!
i wanted to check if out AX3 labelfiles are up-to-date, so i thought i
compare filedate of the labelfiles to last date/time entry in the syslabellog
table.
i used WinAPI::getFileModifiedTime to check the time the label file was last
modified.
i experienced a time difference of 2h ours between the systemtime and the
value the winapi call return for a fresh written labelfile.
looks like the winapi call ignores daylight savingtime and the local timezone.
i build this little workaround:
http://paste2.org/p/229244
static void getTimeDifferenceFS()
{
AsciiIo file;
str TempFile = WinApi::getTempFilename(WinApi::getTempPath(),"Mei");
;
// Write TempFile for timestamp
file = new AsciiIo(TempFile,"w");
file.write();
print TimeNow() - WinApi::getFileModifiedTime(TempFile); // time
differnce in sec between Localtime and modifiedFileTime value returned by
WinAPI::getFileModifiedTime()
pause;
}
Maybe there is more simple solution, i am missing?
Regards,
Timon
i wanted to check if out AX3 labelfiles are up-to-date, so i thought i
compare filedate of the labelfiles to last date/time entry in the syslabellog
table.
i used WinAPI::getFileModifiedTime to check the time the label file was last
modified.
i experienced a time difference of 2h ours between the systemtime and the
value the winapi call return for a fresh written labelfile.
looks like the winapi call ignores daylight savingtime and the local timezone.
i build this little workaround:
http://paste2.org/p/229244
static void getTimeDifferenceFS()
{
AsciiIo file;
str TempFile = WinApi::getTempFilename(WinApi::getTempPath(),"Mei");
;
// Write TempFile for timestamp
file = new AsciiIo(TempFile,"w");
file.write();
print TimeNow() - WinApi::getFileModifiedTime(TempFile); // time
differnce in sec between Localtime and modifiedFileTime value returned by
WinAPI::getFileModifiedTime()
pause;
}
Maybe there is more simple solution, i am missing?
Regards,
Timon