From 201b36d62c998ae4f8c0f8042939d9be614d7757 Mon Sep 17 00:00:00 2001 From: veeck Date: Wed, 6 Jan 2021 12:34:39 +0100 Subject: [PATCH 1/6] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 299f72c4..d612b9fc 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@

Dependency Status - devDependency Status + devDependency Status CLI Best Practices - + CodeCov Status License Tests From e902b8c52f99c1a2ab7bc15d20119e3a7108b3ef Mon Sep 17 00:00:00 2001 From: rejas Date: Tue, 23 Mar 2021 08:15:33 +0100 Subject: [PATCH 2/6] Update PR template --- .github/PULL_REQUEST_TEMPLATE.md | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) 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! From ebfe96d31de35d0145fbfdee8a219cac6e863ffe Mon Sep 17 00:00:00 2001 From: rejas Date: Tue, 23 Mar 2021 09:47:55 +0100 Subject: [PATCH 3/6] Update CONTRIBUTING guidelines --- .github/CONTRIBUTING.md | 5 +++-- README.md | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) 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/README.md b/README.md index d612b9fc..0d75c7ef 100644 --- a/README.md +++ b/README.md @@ -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! From 37d3aa25b15724c13bf279b6ee2335fd68f2a987 Mon Sep 17 00:00:00 2001 From: rejas Date: Tue, 23 Mar 2021 09:55:35 +0100 Subject: [PATCH 4/6] Update CHANGELOG --- CHANGELOG.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91635643..7bacab2c 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. @@ -74,14 +74,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. From d11e4e5c92374b58dddfa0e96a415bc7e952f789 Mon Sep 17 00:00:00 2001 From: Sam Detweiler Date: Tue, 23 Mar 2021 08:44:14 -0500 Subject: [PATCH 5/6] refix #2483 , recurring FULL Day event, start date before 2007 --- CHANGELOG.md | 1 + modules/default/calendar/calendarutils.js | 67 ++++++++++++++--------- 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91635643..e5ae8ed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 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); + } } } } From 70c3b68e676788e3796a3d9b732405bf88b1fb6a Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Wed, 24 Mar 2021 16:20:36 +0100 Subject: [PATCH 6/6] Add FUNDING.yml --- .github/FUNDING.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/FUNDING.yml 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