mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Convert moment(..., "X") to moment.unix(...) (#2950)
because I thought it was more readable and I found a little bug when calculatin suntimes on the way.... Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
@@ -340,7 +340,7 @@ WeatherProvider.register("envcanada", {
|
||||
// Add 1 to the date to reflect the current forecast day we are building
|
||||
|
||||
lastDate = lastDate.add(1, "day");
|
||||
weather.date = moment(lastDate, "X");
|
||||
weather.date = moment.unix(lastDate);
|
||||
|
||||
// Capture the temperatures for the current Element and the next Element in order to set
|
||||
// the Min and Max temperatures for the forecast
|
||||
@@ -395,7 +395,7 @@ WeatherProvider.register("envcanada", {
|
||||
|
||||
const foreTime = moment(hourGroup[stepHour].getAttribute("dateTimeUTC"), "YYYYMMDDhhmmss");
|
||||
const currTime = foreTime.add(hourOffset, "hours");
|
||||
weather.date = moment(currTime, "X");
|
||||
weather.date = moment.unix(currTime);
|
||||
|
||||
// Capture the temperature
|
||||
|
||||
|
Reference in New Issue
Block a user