So I ran into this little issue ... (thanks to user Granny646) Since Windows 8, it seems that Windows doesn't like file dates prior to 1980. This seems a mixed bag of certain functions (for example FileSetDate) not properly supporting dates like that and the Windows File Explorer not displaying it either.
Again: Windows File Explorer will not show a date when file date is set to a date to prior 1980.
However: this is not a filesystem limitation (tested with NTFS, not and issue under macOS and Linux either).
So how do we set the file date with a date like that in Lazarus Pascal? I found a little function for that (minor modification from this one by howardpc):
uses ... FileUtil, Windows ...
function SetFileDate(const aFilename: string; aDate: TDateTime): boolean;
fileHandle : THandle;
fileTime : TFILETIME;
LFileTime : TFILETIME;
LSysTime : TSystemTime;
if not(DirectoryExists(aFilename) or FileExists(aFilename)) then exit;
DecodeDate(aDate, LSysTime.Year, LSysTime.Month, LSysTime.Day);
DecodeTime(aDate, LSysTime.Hour, LSysTime.Minute, LSysTime.Second, LSysTime.Millisecond);
if SystemTimeToFileTime(LSysTime, LFileTime) then
if LocalFileTimeToFileTime(LFileTime, fileTime) then
fileHandle:=FileOpenUTF8(aFilename, fmOpenReadWrite or fmShareExclusive);
if SetFileTime(fileHandle, fileTime, fileTime, fileTime) then
MovieScanner2-2.0.16-Linux-GTK-64bits.tar.gzDate: 2022-05-03 - Size: 29.2 MBA small application that uses FFProbe to scan your video files and logs these details in a small database. This is the 64 bit Linux version for GTK.
MovieScanner2-2.0.16-Linux-QT5-64bits.tar.gzDate: 2022-05-03 - Size: 29.1 MBA small application that uses FFProbe to scan your video files and logs these details in a small database. This is the 64 bit Linux version for QT5.
MovieScanner2-v2.0.16-macOS-64bit.dmgDate: 2022-05-03 - Size: 25.4 MBA small application that uses FFProbe to scan your video files and logs these details in a small database. This is the 64 bit macOS version.