Skip to content

Commit 2de613d

Browse files
committed
refactor(test): ✅ update to set date utc correctly
1 parent e955cd2 commit 2de613d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/utils/common.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { tz } from 'moment-timezone';
12
import { HashAlgorithm, VnpLocale } from '../../src/enums';
23
import {
34
dateFormat,
@@ -13,7 +14,8 @@ import {
1314
describe('Common utils', () => {
1415
let utcDate: Date;
1516
beforeAll(() => {
16-
utcDate = new Date(Date.UTC(2023, 11, 21, 10, 30, 0));
17+
// utcDate = new Date(Date.UTC(2023, 11, 21, 10, 30, 0));
18+
utcDate = tz(new Date(Date.UTC(2023, 11, 21, 10, 30, 0)), 'utc').toDate();
1719
});
1820

1921
describe('getDateInGMT7', () => {

0 commit comments

Comments
 (0)