code: def set_time(filename, mod_time):
  	
  	log.debug('Setting modified time to %s', mod_time)
  	mtime = calendar.timegm(mod_time.utctimetuple())
  	# utctimetuple discards microseconds, so restore it (for consistency)
  	mtime += mod_time.microsecond / 1000000
  	atime = os.stat(filename).st_atime
  	os.utime(filename, (atime, mtime))
docs: Set the modified time of a file