jkv wrote:
Hi Martin,What i usally do is to convert the two times to seconds since epoch and compare the two values in seconds. You can use time.mktime to convert localtime to seconds since epoch.
There's no need to convert - simply retrieve the times as absolute times to begin with:
file_age_in_seconds = time.time() - os.path.getmtime(filename) Only convert to local time for presentation. - Anders -- http://mail.python.org/mailman/listinfo/python-list