Ah, the field in stat returns the time in seconds since 1970, In GMT. So it will be the same regardless of the time zone. I assumed that the dash operators returned the same stuff that was in stat, but the stat gives the data in a different format, and is what I want here. Also, the docs for $^T didn't mention GMT (or UTC), but I suppose it is.
Only thing is, the value is rounded to the nearest second! I would have expected it to return decimal places based on the available accuracy of the file system.
| [reply] [d/l] [select] |
Only thing is, the value is rounded to the nearest second! I would have expected it to return decimal places based on the available accuracy of the file system.
The number of seconds since the 0th second on January 1st, 1970 is a common unix time stamp. That's why it doesn't "return decimal places based on the available accuracy of the file system". Because it's a *nix time stamp, not a universal time stamp (although it is often used as such)
| [reply] |
So is there a good portable way, or an existing popular module already implemented on various OS's, to get the native (or at least full-precision) time stamp of a file?
| [reply] |