Say you got a file’s last update time, using the stat command
and you want to compare it with a datetime object:
Convert the datetime object using the time module:
now compare and rejoice! Also, if you want to display timestamps in a human-friendly format use time.ctime