Os.path.getmtime () does not return part of a second

I compiled python 2.6.4 for centos 5.3 and found this problem in either os.path.getmtime () or os.stat (). m_time has no stake. According to the docs, if os.stat_float_times () returns True, then it should return a float. In my case, I consider it as a float, but not part of the share (it's 0).

In [3]: os.path.getmtime('/tmp') 
Out[3]: 1268339116.0

In [4]: os.stat('/tmp')
Out[4]: posix.stat_result(st_mode=17407, st_ino=508897L, st_dev=29952L, st_nlink=7, st_uid=0, st_gid=0, st_size=4096L, st_atime=1268101696, st_mtime=1268339116, st_ctime=1268339116)

In [5]: os.stat_float_times()
True

In [6]: os.stat('/tmp').st_mtime
Out[6]: 1268339116.0

It is also strange that the result of stat () looks like an int. On Windows, I see a part with the same version of python. I run centos on top of colinux, can this play a role, or is it a python build issue? I could not find any accesses to the general colinux problem. Maybe since colinux is setting up the file system? What will I need to check in this case?

+3
1

, Python. Centos ext3, mtimes. , mtimes ls.

ls -ld --full-time /tmp

ext3 Centos

drwxrwxrwt 11 root root 69632 2010-03-11 13:16:30.000000000 -0800 /tmp

ext4 Ubuntu

drwxrwxrwt 16 root root 20480 2010-03-11 21:20:02.088188962 +0000 /tmp

ext4 :

, Linux , . , ext4 , . , 2 , 2038 204 .

+6

Source: https://habr.com/ru/post/1736558/