Skip to content

Commit

Permalink
add comments explaining date parsing by tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Dec 5, 2022
1 parent fa3677f commit 14240fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ReadTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ export class ReadTask extends ExifToolTask<Tags> {
if (
tagName === "When" ||
tagName.includes("DateTime") ||
tagName.includes("SubSec") ||
tagName.toLowerCase().includes("timestamp")
) {
const d =
Expand All @@ -281,6 +282,7 @@ export class ReadTask extends ExifToolTask<Tags> {
}
if (tagName === "When" || tagName.includes("Date")) {
const d =
// Some tags, like CreationDate, actually include time resolution.
ExifDateTime.fromExifStrict(value, tz) ??
ExifDateTime.fromISO(value, tz) ??
ExifDateTime.fromExifLoose(value, tz) ??
Expand Down

0 comments on commit 14240fd

Please sign in to comment.