diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 92423b0b..56c6cfa9 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -25,13 +25,14 @@ To run StyleLint, use `npm run lint:style`. Please only submit reproducible issues. If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: [https://forum.magicmirror.builders/category/15/bug-hunt](https://forum.magicmirror.builders/category/15/bug-hunt) + Problems installing or configuring your MagicMirror? Check out: [https://forum.magicmirror.builders/category/10/troubleshooting](https://forum.magicmirror.builders/category/10/troubleshooting) When submitting a new issue, please supply the following information: -**Platform**: Place your platform here... give us your web browser/Electron version _and_ your hardware (Raspberry Pi 2/3, Windows, Mac, Linux, System V UNIX). +**Platform**: Place your platform here... give us your web browser/Electron version _and_ your hardware (Raspberry Pi 2/3/4, Windows, Mac, Linux, System V UNIX). -**Node Version**: Make sure it's version 0.12.13 or later. +**Node Version**: Make sure it's version 10 or later. **MagicMirror Version**: Now that the versions have split, tell us if you are using the PHP version (v1) or the newer JavaScript version (v2). diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..e31c82eb --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: MichMich +custom: ['https://magicmirror.builders/#donate'] \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 28b71616..bbb09f36 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,13 +1,28 @@ -> Please send your pull requests the develop branch. -> Don't forget to add the change to CHANGELOG.md. +Hello and thank you for wanting to contribute to the MagicMirror project + +**Please make sure that you have followed these 4 rules before submitting your Pull Request:** + +> 1) Base your pull requests against the `develop` branch. +> +> +> 2) Include these infos in the description: +> * Does the pull request solve a **related** issue? +> * If so, can you reference the issue like this `Fixes #`? +> * What does the pull request accomplish? Use a list if needed. +> * If it includes major visual changes please add screenshots. +> +> +> 3) Please run `npm run lint:prettier` before submitting so that +> style issues are fixed. +> +> +> 4) Don't forget to add an entry about your changes to +> the CHANGELOG.md file. + **Note**: Sometimes the development moves very fast. It is highly recommended that you update your branch of `develop` before creating a pull request to send us your changes. This makes everyone's lives easier (including yours) and helps us out on the development team. -Thanks! -- Does the pull request solve a **related** issue? -- If so, can you reference the issue? -- What does the pull request accomplish? Use a list if needed. -- If it includes major visual changes please add screenshots. +Thanks again and have a nice day! diff --git a/CHANGELOG.md b/CHANGELOG.md index 91635643..d426513f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,12 +27,12 @@ _This release is scheduled to be released on 2021-04-01._ ### Updated -- Updated markdown files. +- Updated markdown files for github. - Cleaned up old code on server side. - Convert `-0` to `0` when displaying temperature. - Code cleanup for FEELS like and added {DEGREE} placeholder for FEELSLIKE for each language - Converted newsfeed module to use templates. -- Update documentation and help screen about invalid config files. +- Updated documentation and help screen about invalid config files. - Moving weather provider specific code and configuration into each provider and making hourly part of the interface. - Bump electron to v11 and enable contextIsolation. - Don't update the DOM when a module is not displayed. @@ -63,6 +63,7 @@ _This release is scheduled to be released on 2021-04-01._ - Fix weather module openweathermap not loading if lat and lon set without onecall. - Fix calendar daylight savings offset calculation if recurring start date before 2007 - Fix calendar time/date adjustment when time with GMT offset is different day (#2488) +- Fix calendar daylight savings offset calculation if recurring FULL DAY start date before 2007 (#2483) ## [2.14.0] - 2021-01-01 @@ -74,14 +75,13 @@ Special thanks to the following contributors: @Alvinger, @AndyPoms, @ashishtank, - Added new log level "debug" to the logger. - Added new parameter "useKmh" to weather module for displaying wind speed as kmh. -- Chuvash translation. +- Added Chuvash translation. - Added Weatherbit as a provider to Weather module. - Added SMHI as a provider to Weather module. - Added Hindi & Gujarati translation. - Added optional support for DEGREE position in Feels like translation. - Added support for variables in nunjucks templates for translate filter. - Added Chuvash translation. -- Calendar: new options "limitDays" and "coloredEvents". - Added new option "limitDays" - limit the number of discreet days displayed. - Added new option "customEvents" - use custom symbol/color based on keyword in event title. diff --git a/README.md b/README.md index 299f72c4..0d75c7ef 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@

Dependency Status - devDependency Status + devDependency Status CLI Best Practices - + CodeCov Status License Tests @@ -29,7 +29,13 @@ For the full documentation including **[installation instructions](https://docs. ## Contributing Guidelines -Contributions of all kinds are welcome, not only in the form of code but also with regards bug reports and documentation. For the full contribution guidelines, check out: [https://docs.magicmirror.builders/getting-started/contributing.html](https://docs.magicmirror.builders/getting-started/contributing.html) +Contributions of all kinds are welcome, not only in the form of code but also with regards to + +- bug reports +- documentation +- translations + +For the full contribution guidelines, check out: [https://docs.magicmirror.builders/getting-started/contributing.html](https://docs.magicmirror.builders/getting-started/contributing.html) ## Enjoying MagicMirror? Consider a donation! diff --git a/modules/default/calendar/calendarutils.js b/modules/default/calendar/calendarutils.js index fc45d583..223dfb26 100644 --- a/modules/default/calendar/calendarutils.js +++ b/modules/default/calendar/calendarutils.js @@ -300,29 +300,43 @@ const CalendarUtils = { // this will be the correction we need to apply let nowOffset = new Date().getTimezoneOffset(); // for full day events, the time might be off from RRULE/Luxon problem + // get time zone offset of the rule calculated event + let dateoffset = date.getTimezoneOffset(); + // reduce the time by the offset + Log.debug(" recurring date is " + date + " offset is " + dateoffset); + let dh = moment(date).format("HH"); + Log.debug(" recurring date is " + date + " offset is " + dateoffset / 60 + " Hour is " + dh); if (CalendarUtils.isFullDayEvent(event)) { Log.debug("fullday"); // if the offset is negative, east of GMT where the problem is - if (date.getTimezoneOffset() < 0) { - Log.debug("now offset is " + nowOffset); - // reduce the time by the offset - Log.debug(" recurring date is " + date + " offset is " + date.getTimezoneOffset()); - // apply the correction to the date/time to get it UTC relative - date = new Date(date.getTime() - Math.abs(nowOffset) * 60000); - // the duration was calculated way back at the top before we could correct the start time.. - // fix it for this event entry - duration = 24 * 60 * 60 * 1000; - Log.debug("new recurring date is " + date); + if (dateoffset < 0) { + // if the date hour is less than the offset + if (dh < Math.abs(dateoffset / 60)) { + // reduce the time by the offset + Log.debug(" recurring date is " + date + " offset is " + dateoffset); + // apply the correction to the date/time to get it UTC relative + date = new Date(date.getTime() - Math.abs(nowOffset) * 60000); + // the duration was calculated way back at the top before we could correct the start time.. + // fix it for this event entry + //duration = 24 * 60 * 60 * 1000; + Log.debug("new recurring date1 is " + date); + } + } else { + // if the timezones are the same, correct date if needed + if (event.start.tz === moment.tz.guess()) { + // if the date hour is less than the offset + if (24 - dh < Math.abs(dateoffset / 60)) { + // apply the correction to the date/time back to right day + date = new Date(date.getTime() + Math.abs(24 * 60) * 60000); + // the duration was calculated way back at the top before we could correct the start time.. + // fix it for this event entry + //duration = 24 * 60 * 60 * 1000; + Log.debug("new recurring date2 is " + date); + } + } } } else { // not full day, but luxon can still screw up the date on the rule processing - // get time zone offset of the rule calculated event - let dateoffset = date.getTimezoneOffset(); - // reduce the time by the offset - Log.debug(" recurring date is " + date + " offset is " + dateoffset); - let dh = moment(date).format("HH"); - Log.debug(" recurring date is " + date + " offset is " + dateoffset / 60 + " Hour is " + dh); - // we need to correct the date to get back to the right event for if (dateoffset < 0) { // if the date hour is less than the offset @@ -337,14 +351,17 @@ const CalendarUtils = { Log.debug("new recurring date1 is " + date); } } else { - // if the date hour is less than the offset - if (24 - dh < Math.abs(dateoffset / 60)) { - // apply the correction to the date/time back to right day - date = new Date(date.getTime() + Math.abs(24 * 60) * 60000); - // the duration was calculated way back at the top before we could correct the start time.. - // fix it for this event entry - //duration = 24 * 60 * 60 * 1000; - Log.debug("new recurring date2 is " + date); + // if the timezones are the same, correct date if needed + if (event.start.tz === moment.tz.guess()) { + // if the date hour is less than the offset + if (24 - dh < Math.abs(dateoffset / 60)) { + // apply the correction to the date/time back to right day + date = new Date(date.getTime() + Math.abs(24 * 60) * 60000); + // the duration was calculated way back at the top before we could correct the start time.. + // fix it for this event entry + //duration = 24 * 60 * 60 * 1000; + Log.debug("new recurring date2 is " + date); + } } } }