This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Subsecond timestamps
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: gvanrossum, loewis
Priority: normal Keywords: patch

Created on 2002-09-09 05:57 by loewis, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
stat.diff loewis, 2002-09-09 05:57
Messages (5)
msg41127 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-09-09 05:57
This patch changes st_mtime/atime/ctime to use floats
if the system offers the st.st_mtim.tv_nsec field and
if that field is nonzero. Support for other APIs can be
added as they come available (on Windows, I believe
you'll have to sidestep the C library to get FILETIMEs).

While this is an API change, reports indicate that
Python applications deal fine with getting floats from
stat.
msg41128 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-09-09 12:08
Logged In: YES 
user_id=6380

Looks good. Please check it in, adding a NEWS item.
msg41129 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-09-09 14:25
Logged In: YES 
user_id=21627

Committed as 

configure 1.331
configure.in 1.342
pyconfig.h.in 1.48
libos.tex 1.95
NEWS 1.482
posixmodule.c 2.254
msg41130 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-09-09 14:35
Logged In: YES 
user_id=6380

Hm, I didn't read the patch carefully enough. I'd prefer it
of the values were *always* floats. This avoids portability
problems where someone tests their code on a system where
they happen to be ints, and then the code is ported to a
system that has floats.

Same as with time.time(): this always returns a float, even
if the resolution is only seconds.
msg41131 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-09-09 16:20
Logged In: YES 
user_id=21627

Correct in posixmodule.c 1.255, libos.tex 2.255.
History
Date User Action Args
2022-04-10 16:05:40adminsetgithub: 37156
2002-09-09 05:57:42loewiscreate