os.utime()

os.utime(path, (atime, mtime)) utime(path, None)

Set the access and modified time of the file to the given values. If the second form is used, set the access and modified times to the current time.