[Python-bugs-list] [ python-Bugs-827902 ] ctime is not creation time
SourceForge.net
noreply at sourceforge.net
Tue Oct 28 15:26:34 EST 2003
Bugs item #827902, was opened at 2003-10-22 02:32
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=827902&group_id=5470
Category: Documentation
Group: Python 2.3
Status: Open
Resolution: Fixed
Priority: 5
Submitted By: Robert Siemer (siemer)
Assigned to: Nobody/Anonymous (nobody)
Summary: ctime is not creation time
Initial Comment:
Hi!
http://python.org/doc/current/lib/module-os.path.html
says getctime() returns the creation time. But it
probably returns the ctime, which has nothing to do
with creation.
Bye,
Robert
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2003-10-28 21:26
Message:
Logged In: YES
user_id=21627
I suggest to document all of these: it returns the system's
ctime, which, on some systems (e.g. Unix) is change time,
and, on others (e.g. Windows), is creation time.
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger)
Date: 2003-10-28 07:22
Message:
Logged In: YES
user_id=80475
Hmm, it looks like there is more that one answer.
>From Linux man pages: ctime is the "inode change time"
>From MSDN specs: ctime "Indicates the creation time for
this storage, stream, or byte array".
We can either document both or just put that getctime
returns the operating system's ctime field for open storage,
a stream, or a byte-array.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-10-28 00:57
Message:
Logged In: YES
user_id=21627
So what about the issue that ctime really does mean
"creation time" on Windows?
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger)
Date: 2003-10-27 21:05
Message:
Logged In: YES
user_id=80475
Fixed.
See Doc/lib/libposixpath.tex 1.37 and 1.36.12.1.
----------------------------------------------------------------------
Comment By: Johan M. Hahn (johahn)
Date: 2003-10-23 10:14
Message:
Logged In: YES
user_id=887415
On Windows 2000 os.path.ctime (-> ntpath.getctime ->
ntpath.stat.st_ctime) returns creation time.
----------------------------------------------------------------------
Comment By: Robert Siemer (siemer)
Date: 2003-10-23 00:11
Message:
Logged In: YES
user_id=150699
ctime is the time of last modification of file status
information.
Means: gets updated on everything... (-:
There is no way on classic Linux-Filesystems to get the
creation time.
----------------------------------------------------------------------
Comment By: Sjoerd Mullender (sjoerd)
Date: 2003-10-22 23:14
Message:
Logged In: YES
user_id=43607
ctime is change time. Read the manual (stat(2)):
time_t st_atime; /* time of last access */
time_t st_mtime; /* time of last modification */
time_t st_ctime; /* time of last change */
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-10-22 18:02
Message:
Logged In: YES
user_id=21627
Why do you say ctime has nothing to do with creation? What
else does ctime indicate?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=827902&group_id=5470
More information about the Python-bugs-list
mailing list