Skip to content

Commit

Permalink
#1778 Make sure operation on selected pics only if neither --uuid nor…
Browse files Browse the repository at this point in the history
… --uuid-from-file are speci
  • Loading branch information
oPromessa committed Jan 16, 2025
1 parent 7bb3bcc commit 3cff021
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions osxphotos/photodates.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,19 @@ def update_photo_time_for_new_timezone(
old_timezone_offset = PhotoTimeZone(library_path=library_path).get_timezone(photo)[
0
]
for k in PhotoTimeZone(library_path=library_path).get_timezone(photo):
verbose(f"DEBUG: Old Photo timezone: {k}")

delta = old_timezone_offset - new_timezone.offset

verbose(f"DEBUG: Delta: {delta} old tz: {old_timezone_offset} new tz: {new_timezone.offset}")

photo_date = photo.date
new_photo_date = update_datetime(
dt=photo_date, time_delta=datetime.timedelta(seconds=delta)
)
verbose(f"DEBUG: Photo date: {photo_date} new photo date: {new_photo_date}")

filename = photo.filename
uuid = photo.uuid
if photo_date != new_photo_date:
Expand Down

0 comments on commit 3cff021

Please sign in to comment.