Skip to content

Commit

Permalink
Fix #169 test for any time zone
Browse files Browse the repository at this point in the history
  • Loading branch information
marnusw committed Mar 25, 2022
1 parent 7c6c09f commit 0e08e6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/format/test.js
Expand Up @@ -688,7 +688,8 @@ describe('format', function () {
it('https://github.com/marnusw/date-fns-tz/issues/168', () => {
const timeZone = 'Europe/Stockholm'
const dateInUTC = Date.UTC(1888, 11, 1)
const result = format(dateInUTC, "yyyy-MM-dd'T'HH:mm:ss.SSSxxx", { timeZone })
const offsetDate = utcToZonedTime(dateInUTC, timeZone)
const result = format(offsetDate, "yyyy-MM-dd'T'HH:mm:ss.SSSxxx", { timeZone })
assert.equal(result, '1888-12-01T01:00:14.000+01:00')
})
})
Expand Down

0 comments on commit 0e08e6f

Please sign in to comment.