Skip to content

Commit

Permalink
Verify that ExifDateTime parses timestamps with spurious suffixes lik…
Browse files Browse the repository at this point in the history
…e "DST"
  • Loading branch information
mceachen committed Sep 27, 2022
1 parent 3e2843a commit c6cac85
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ExifDateTime.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,13 @@ describe("ExifDateTime", () => {
})
})

it("parses timestamps that end in DST", () => {
const raw = "2014:07:17 08:46:27-07:00 DST"
const dt = ExifDateTime.fromEXIF(raw)!
expect(dt.toISOString()).to.eql("2014-07-17T08:46:27.000-07:00")
expect(dt.zone).to.eql("UTC-7")
})

it("try to repro issue #46", () => {
const edt = new ExifDateTime(2019, 3, 8, 14, 24, 54, 0, -480)
const dt = edt.toDateTime()
Expand Down

0 comments on commit c6cac85

Please sign in to comment.