New Limits for SetFileDate with PB6.10

Just starting out? Need help? Post your questions and find answers here.
juergenkulow
Enthusiast
Enthusiast
Posts: 581
Joined: Wed Sep 25, 2019 10:18 am

New Limits for SetFileDate with PB6.10

Post by juergenkulow »

Linux Mint 21 Cinnamon 5.4.12:

Code: Select all

SetFileDate("/tmp/a.out", #PB_Date_Modified, Date(2446,5,11,0,38,56))
; kulow@kulow-G73Jw:/tmp$ ls --full-time
; -rwxrwxr-x 1 kulow    kulow     18720 2446-05-11 00:38:55.000000000 +0200 a.out

Code: Select all

SetFileDate("/tmp/a.out", #PB_Date_Modified, Date(1901,12,13,21,45,51))
; -rwxrwxr-x 1 kulow    kulow     18720 1901-12-13 21:45:52.000000000 +0100 a.out
What are the limits of the other operating systems?
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 563
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Re: New Limits for SetFileDate with PB6.10

Post by Sicro »

This depends on the file system used:
  • NTFS (Windows): 01.01.1601 to 28.05.60056
  • exFAT (Windows): 01.01.1980 to 31.12.2107
  • ext2 (Linux): 14.12.1901 to 18.01.2038
  • ext3 (Linux): 14.12.1901 to 18.01.2038
  • ext4 (Linux): 14.12.1901 to 10.05.2446
  • APFS (Apple): 01.01.1970 to 21.07.2554
In the Wikipedia articles, this information is given on the right side at "date range":
Image
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Post Reply