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.

Title: Subsecond timestamps
Type: Stage:
Components: Interpreter Core Versions:
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.

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
msg41128 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-09-09 12:08
Logged In: YES 

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 

Committed as 

configure 1.331 1.342 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 

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 

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