As described in the Python os module , this is a portable interface for OS-specific functionality. Depending on which platform you are running on, you will get different behavior.
In particular, the modification time returned by stat calls depends on the file system in which the files are located. For example, for entries in the FAT file system, the maximum resolution for the modification time is 2 seconds. Other file systems will have different permissions.
source share