def update_ts(file, timestamp): try: ef = exiv_file(file) ef.set_date_time(datetime.fromtimestamp(timestamp)) ef.save_file() except Exception as e: logger.exception('Something happened when writting time metadata in file %s', file);
def update_date(file, date): ef = exiv_file(file) ef.set_date_time(date) ef.save_file()