Recent

Author Topic: Different date and time for files, Windows versus Lazarus  (Read 3249 times)

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: Different date and time for files, Windows versus Lazarus
« Reply #15 on: July 28, 2020, 04:48:51 pm »
   My computer's Time zone is set to "(UTC-05:00) Eastern Time (US & Canada)." The switch for "Adjust for daylight saving time automatically" is set to "On." Both files were saved with those settings on the dates shown; i.e. I did not change the date manually and then save the files.

BTW, I have seen this behavior for many years across a number of applications, such as some Zip-compatible archiving apps.
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Different date and time for files, Windows versus Lazarus
« Reply #16 on: July 28, 2020, 10:17:13 pm »
It all depends on rounding. The date on a NTFS has a higher precision than 1 second. So if the time is 01:01:00.123 then Windows might display it as 01:01:00 while the mechanism of FPC to calculate the 2-second precision time might be 01:01:02. Don't be bothered too much by that 2 second difference.

The direction of rounding is critically important when one's using make... and my recollection is that MS was just one of many development teams to do so in the mid 80s when the DOS/Windows/C APIs were maturing.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018