Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
use DateCreated as DateTimeOriginal fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavkgrd committed Apr 17, 2023
1 parent 4c1c17c commit d5c7d68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/updateCreationTimeWithExif.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export async function updateCreationTimeWithExif(
);
if (fixOption === FIX_OPTIONS.DATE_TIME_ORIGINAL) {
correctCreationTime = getUnixTimeInMicroSeconds(
exifData?.DateTimeOriginal
exifData?.DateTimeOriginal ?? exifData?.DateCreated
);
} else {
correctCreationTime = getUnixTimeInMicroSeconds(
exifData?.CreateDate ?? exifData?.DateCreated
exifData?.CreateDate
);
}
}
Expand Down

0 comments on commit d5c7d68

Please sign in to comment.