projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #18714 from MegaphoneJon/financial-111
[civicrm-core.git]
/
tests
/
karma
/
unit
/
crmMailingRadioDateSpec.js
diff --git
a/tests/karma/unit/crmMailingRadioDateSpec.js
b/tests/karma/unit/crmMailingRadioDateSpec.js
index 279f331bbe16218523fc52eddb5667b0c15e4633..0e47406b3e78563575ab85e364b36c61eb7d408c 100644
(file)
--- 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 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();
model.the_date = currentDate;
$rootScope.$digest();