Compare 2 times



I have a requirement to test the creation time of a file with the
current time and raise a message if the file is more than 15 minutes
old.

Platform is Unix.

I have looked at using os.path.getctime for the file creation time and
time.time() for the current time, but is this the best approach?



.



Relevant Pages

  • Re: Compare 2 times
    ... current time and raise a message if the file is more than 15 minutes ... Platform is Unix. ... The creation time is not ...
    (comp.lang.python)
  • Re: Compare 2 times
    ... current time and raise a message if the file is more than 15 minutes ... Platform is Unix. ... The creation time is not ...
    (comp.lang.python)
  • Re: Compare 2 times
    ... Platform is Unix. ... Unless you are using ext4 you are going to have to store the creation ... sqlite3 or shelve module to store the creation time for each file then ...
    (comp.lang.python)
  • Re: Get age of a file/dir
    ... Python has a builtin module called "stat" which ... includes ST_ATIME, ST_MTIME, ST_CTIME members which are times accessed, ... However this only gets creation time on Windows, on Unix it gets the the ...
    (comp.lang.python)
  • Re: ls with creation time
    ... D M Ritchie, K Thompson, "The UNIX Time-Sharing System", The Bell ... that the Bell Labs paper is a revision of the CACM paper. ... description in the CACM paper) but creation time was not one of them. ...
    (comp.unix.shell)