Fix timezone mismatch in server tests (#1918)

This commit is contained in:
Sergey Kondrikov
2023-03-16 17:02:40 +03:00
committed by GitHub
parent 87d84b922f
commit 82e8cd0f8d
3 changed files with 11 additions and 1 deletions

View File

@@ -3,6 +3,12 @@
import { timeUtils } from './time-utils';
describe('Time Utilities', () => {
describe('timezone', () => {
it('should always be UTC', () => {
expect(new Date().getTimezoneOffset()).toBe(0);
});
});
describe('checkValidTimestamp', () => {
it('check for year 0000', () => {
const result = timeUtils.checkValidTimestamp('0000-00-00T00:00:00.000Z');