From 4b65792585f1fc5a089c28201c7c9a6cd253334b Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Thu, 26 Nov 2020 20:48:43 +0100 Subject: [PATCH] Tests now are UTC based to avoid locale conflicts --- test/src/util/formatting/date-format.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/src/util/formatting/date-format.js b/test/src/util/formatting/date-format.js index dbf4d606..8634f9ea 100644 --- a/test/src/util/formatting/date-format.js +++ b/test/src/util/formatting/date-format.js @@ -2,14 +2,14 @@ import { expect } from 'chai'; import { DateFormat } from 'util/formatting/date-format'; describe('DateFormat', () => { - const dt = new Date(2020, 0, 2, 3, 4, 5, 6); + const dt = new Date.UTC(2020, 0, 2, 3, 4, 5, 6); it('should format date', () => { - expect(DateFormat.dStr(dt)).to.eql('2 Jan 2020'); + expect(DateFormat.dStr(dt)).to.eql('Jan 2, 2020'); }); it('should format date and time', () => { - expect(DateFormat.dtStr(dt)).to.eql('2 Jan 2020 03:04:05'); + expect(DateFormat.dtStr(dt)).to.eql('Jan 2, 2020, 03:04:05 AM'); }); it('should format date and time in sortable format', () => {