Skip to content

Commit

Permalink
fix: time formatter test (apache#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Ritter authored and zhaoyongjie committed Nov 24, 2021
1 parent 0a52a10 commit 6b6c01c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('createD3TimeFormatter(config)', () => {
const formatterInUTC = createD3TimeFormatter({
formatString: TimeFormats.DATABASE_DATETIME,
});
const offset = new Date().getTimezoneOffset(); // in minutes
const offset = new Date(PREVIEW_TIME.valueOf()).getTimezoneOffset(); // in minutes
const expected =
offset === 0
? '2017-02-14 11:22:33'
Expand Down Expand Up @@ -90,7 +90,7 @@ describe('createD3TimeFormatter(config)', () => {
formatString: '%c',
locale: thLocale,
});
const offset = new Date().getTimezoneOffset();
const offset = new Date(PREVIEW_TIME.valueOf()).getTimezoneOffset();
const expected =
offset === 0
? 'อา. 20 ธ.ค. 2015 00:00:00'
Expand Down

0 comments on commit 6b6c01c

Please sign in to comment.