Ok. I talked about this point before, so here it is again!
In this and other similar topics, several methods to get the date/time in a locale independent way are presented. These methods are based on
external commands, like wmic, makecab, robocopy, reg, typeperf, etc, that frequently are slow. For your information, these are the sizes of such external files: wmic.exe=505,344 byes; makecab.exe=83,968 bytes; robocopy.exe=126,464 bytes; reg.exe=72,192 bytes; typeperf.exe=47,104 bytes. However, no one of these commands were designed to
get the date, so the methods takes the date from a secondary output line that have different formats depending on the locale, so the original locale date problem is just replaced by another, similar one, that frequently requires tricky code to extract the result.
Besides, all these methods just get the
current date and time; they can not be used to get the date and time of a file, so the file age can be calculated.
I just wanted to remind you that some time ago I wrote a couple auxiliary commands, called
StdTime.exe and StdDate.exe, that were designed to get current date and time independently from locale, and to get the same data from files. These .exe files are just 3072 bytes long...
Antonio