From ada875b76665d62ade22c718ce69a73b76a76ab1 Mon Sep 17 00:00:00 2001 From: DemeritCowboy Date: Mon, 30 Sep 2019 20:03:10 -0400 Subject: [PATCH] GMT fix --- tests/karma/unit/crmMailingRadioDateSpec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/karma/unit/crmMailingRadioDateSpec.js b/tests/karma/unit/crmMailingRadioDateSpec.js index 279f331bbe..0e47406b3e 100644 --- a/tests/karma/unit/crmMailingRadioDateSpec.js +++ b/tests/karma/unit/crmMailingRadioDateSpec.js @@ -107,7 +107,10 @@ describe('crmMailingRadioDate', function() { var datenow = [year, month, day].join('-'); var time = [hours, minutes, "00"].join(':'); var currentDate = datenow + ' ' + time; - var ndate = new Date(datenow); + // Using datenow in the constructor here converts to local time. If not + // running on GMT (or east) then comparison to toDateString below fails. + // Also use month-1 because...javascript. + var ndate = new Date(year, month-1, day, 0, 0, 0); model.the_date = currentDate; $rootScope.$digest(); -- 2.25.1