Mathics icon indicating copy to clipboard operation
Mathics copied to clipboard

Happy 2021! - SetFileDate broken with year change

Open rocky opened this issue 4 years ago • 1 comments

For now, I've set the SetFileDate tests in #1089 to 2002, if you go back to 2001 or 2000 you'll see the bugs.

rocky avatar Jan 01 '21 19:01 rocky

Right now I am thinking the problem is in Python's os.utime:

Note that the exact times you set here may not be returned by a subsequent stat() call, depending on the resolution with which your operating system records access and modification times; see stat(). The best way to preserve exact times is to use the st_atime_ns and st_mtime_ns fields from the os.stat() result object with the ns parameter to utime

rocky avatar Jan 03 '21 14:01 rocky