Skip to content

Commit 8dfd0b3

Browse files
committed
feat: reset timezone test
1 parent 187bfbb commit 8dfd0b3

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

tests/generateWithTZ.spec.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@ describe('dayjs: getNow', () => {
3838
const M_now = moment().tz(JP);
3939

4040
expect(D_now.format()).toEqual(M_now.format());
41-
42-
const expectedOffset = M_now.utcOffset() / 60;
43-
const actualOffset = D_now.get('hour') - D_now.utc().get('hour');
44-
45-
let normalizedOffset = actualOffset;
46-
if (actualOffset > 12) {
47-
normalizedOffset = actualOffset - 24;
48-
} else if (actualOffset < -12) {
49-
normalizedOffset = actualOffset + 24;
50-
}
51-
expect(normalizedOffset).toEqual(expectedOffset);
41+
expect(D_now.get('hour') - D_now.utc().get('hour')).toEqual(9);
5242
});
5343
});

0 commit comments

Comments
 (0)