diff --git a/public/app/core/specs/datemath.jest.ts b/public/app/core/specs/datemath.jest.ts index 0b752876882..e2bdebcebce 100644 --- a/public/app/core/specs/datemath.jest.ts +++ b/public/app/core/specs/datemath.jest.ts @@ -48,7 +48,7 @@ describe("DateMath", () => { it("now/d on a utc dashboard should be start of the current day in UTC time", () => { var today = new Date(); - var expected = new Date(Date.UTC(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0, 0)); + var expected = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate(), 0, 0, 0, 0)); var startOfDay = dateMath.parse('now/d', false, 'utc').valueOf(); expect(startOfDay).toBe(expected.getTime()); diff --git a/public/app/core/specs/kbn.jest.ts b/public/app/core/specs/kbn.jest.ts index efeaeaee8b2..9f50a05d5ad 100644 --- a/public/app/core/specs/kbn.jest.ts +++ b/public/app/core/specs/kbn.jest.ts @@ -114,7 +114,7 @@ describe('date time formats', function() { it('should format as US date', function() { var str = kbn.valueFormats.dateTimeAsUS(1505634997920, 1); - expect(str).toBe(moment(1505634997920).format('MM/DD/YYYY H:mm:ss a')); + expect(str).toBe(moment(1505634997920).format('MM/DD/YYYY h:mm:ss a')); }); it('should format as US date and skip date when today', function() {