Compare 2 times

Nobody nobody at nowhere.com
Wed Jun 6 14:20:55 EDT 2012


On Wed, 06 Jun 2012 05:50:02 -0700, loial wrote:

> 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?

Most Unix filesystems don't store a "creation" time.




More information about the Python-list mailing list