Indeed - it appears that the newer function got eventually fixed but not the older one.
Here’s the code now. I can now also reproduce the issue on macOS 11 and later - all it needs is a change of the current time zone:
dim fs() as FolderItem = Array (_
new FolderItem ("/System", FolderItem.PathModes.Native), _
new FolderItem ("/tmp/", FolderItem.PathModes.Native), _
SpecialFolder.Desktop.TrueItem(1) )
dim foundOne as Boolean, wrongZT as Integer
for each f as FolderItem in fs
dim d1 as Date = f.ModificationDateTime
dim d2 as Date = f.ModificationDate
dim sh as new Shell
sh.Execute "stat -f ""%Sm"" -t ""%R"" "+f.ShellPath
dim statTime as String = sh.Result.Trim
dim xojoTime as String = d1.ShortTime
if statTime <> xojoTime then
foundOne = true
Msgbox "The ModificationDateTime from Xojo ("+xojoTime+") and the OS ("+statTime+") are different for "+f.NativePath
exit
else
xojoTime = d2.ShortTime
if statTime <> xojoTime then
foundOne = true
Msgbox "The ModificationDate from Xojo ("+xojoTime+") and the OS ("+statTime+") are different for "+f.NativePath
exit
end if
end if
next
if not foundOne then
Msgbox "The times all match. Now please change the Time Zone to any other, preferably something uncommon, e.g. Middle or Eastern Asia. Make sure to leave the Date & Time panel after the change and before running this again."
end if
quit
Sigh… I’ve already contemplated writing my own damn date class because of another bug I found that that is only fixed with the 2.0 ATT version. But now knowing I can’t trust it to display folderitem dates correctly… Sheesh…
@tempelorg I hope that they pay attention to your reports, for most of us here, they don’t.
2022r1.1 which is what I use for 99.9% of the work I’m doing
Its the latest version clients are willing to update to - esp for Windows apps
We’re not using API 2 for anything nor Desktop controls etc
There just hasn’t been anything compelling to update for in later releases
I haven’t renewed my license since the launch of DesktopControls.
I do read the release notes for each new release and there’s not been anything there appears to benefit me.
I have told Xojo employees and Xojo MVPs what I need from Xojo and what would make me renew my license. It’s been over a year now, so I must and I really must start new projects in a different tool.