Skip to content

Commit bf83341

Browse files
authored
Merge branch 'develop' into broadcast-custom-symbols
2 parents cf428dc + c4d2a7b commit bf83341

File tree

4 files changed

+31
-13
lines changed

4 files changed

+31
-13
lines changed

.github/CONTRIBUTING.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ Thanks for contributing to MagicMirror²!
44

55
We hold our code to standard, and these standards are documented below.
66

7+
## Linters
8+
79
If you wish to run our linters, use `npm run lint` without any arguments.
810

911
### JavaScript: Run ESLint
1012

1113
We use [ESLint](https://eslint.org) on our JavaScript files.
1214

13-
Our ESLint configuration is in our .eslintrc.json and .eslintignore files.
15+
Our ESLint configuration is in our `.eslintrc.json` and `.eslintignore` files.
1416

1517
To run ESLint, use `npm run lint:js`.
1618

@@ -20,7 +22,15 @@ We use [StyleLint](https://stylelint.io) to lint our CSS. Our configuration is i
2022

2123
To run StyleLint, use `npm run lint:css`.
2224

23-
### Submitting Issues
25+
## Testing
26+
27+
We use [Jest](https://jestjs.io) for JavaScript testing.
28+
29+
To run all tests, use `npm run test`.
30+
31+
The specific test commands are defined in `package.json`. So you can also run the specific tests with other commands, e.g. `npm run test:unit` or `npx jest tests/e2e/env_spec.js`.
32+
33+
## Submitting Issues
2434

2535
Please only submit reproducible issues.
2636

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ _This release is scheduled to be released on 2022-01-01._
4141
- Fixed electron tests with retry.
4242
- Fixed Calendar recurring cross timezone error (add/subtract a day, not just offset hours) (#2632)
4343
- Fixed Calendar showEnd and Full Date overlay (#2629)
44+
- Fixed regression on #2632, #2752
4445
- Broadcast custom symbols in CALENDAR_EVENTS
4546

4647
## [2.17.1] - 2021-10-01

js/electron.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function createWindow() {
5353
// If config.address is not defined or is an empty string (listening on all interfaces), connect to localhost
5454

5555
let prefix;
56-
if (config["tls"] !== null && config["tls"]) {
56+
if ((config["tls"] !== null && config["tls"]) || config.useHttps) {
5757
prefix = "https://";
5858
} else {
5959
prefix = "http://";
@@ -140,6 +140,13 @@ app.on("before-quit", (event) => {
140140
process.exit(0);
141141
});
142142

143+
/* handle errors from self signed certificates */
144+
145+
app.on("certificate-error", (event, webContents, url, error, certificate, callback) => {
146+
event.preventDefault();
147+
callback(true);
148+
});
149+
143150
// Start the core application if server is run on localhost
144151
// This starts all node helpers and starts the webserver.
145152
if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].includes(config.address)) {

modules/default/calendar/calendarutils.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,15 @@ const CalendarUtils = {
332332
Log.debug("Fullday");
333333
// If the offset is negative (east of GMT), where the problem is
334334
if (dateoffset < 0) {
335-
//if (dh <= Math.abs(dateoffset / 60)) {
336-
// reduce the time by the offset
337-
// Apply the correction to the date/time to get it UTC relative
338-
date = new Date(date.getTime() - Math.abs(24 * 60) * 60000);
339-
// the duration was calculated way back at the top before we could correct the start time..
340-
// fix it for this event entry
341-
//duration = 24 * 60 * 60 * 1000;
342-
Log.debug("new recurring date1 is " + date);
343-
//}
335+
if (dh < Math.abs(dateoffset / 60)) {
336+
// reduce the time by the offset
337+
// Apply the correction to the date/time to get it UTC relative
338+
date = new Date(date.getTime() - Math.abs(24 * 60) * 60000);
339+
// the duration was calculated way back at the top before we could correct the start time..
340+
// fix it for this event entry
341+
//duration = 24 * 60 * 60 * 1000;
342+
Log.debug("new recurring date1 fulldate is " + date);
343+
}
344344
} else {
345345
// if the timezones are the same, correct date if needed
346346
//if (event.start.tz === moment.tz.guess()) {
@@ -351,7 +351,7 @@ const CalendarUtils = {
351351
// the duration was calculated way back at the top before we could correct the start time..
352352
// fix it for this event entry
353353
//duration = 24 * 60 * 60 * 1000;
354-
Log.debug("new recurring date2 is " + date);
354+
Log.debug("new recurring date2 fulldate is " + date);
355355
}
356356
//}
357357
}

0 commit comments

Comments
 (0)