Skip to content

Commit

Permalink
Assume datetime has no offset from UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
153957 committed Jun 16, 2023
1 parent 1f32ec5 commit 2cb24ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions time_lapse/check_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def get_image_date(image_path: str) -> datetime.datetime:
tags = exifreader.process_file(_file, details=False)
date_time = tags['EXIF DateTimeOriginal'].values
subsec = tags['EXIF SubSecTimeOriginal'].values
full_date_time = f'{date_time}.{subsec}'
image_date = datetime.datetime.strptime(full_date_time, '%Y:%m:%d %H:%M:%S.%f')
full_date_time = f'{date_time}.{subsec}+0000'
image_date = datetime.datetime.strptime(full_date_time, '%Y:%m:%d %H:%M:%S.%f%z')
return image_date


Expand Down

0 comments on commit 2cb24ba

Please sign in to comment.