Update weatherbit.js

This commit is contained in:
Andrew 2020-11-14 18:28:20 -05:00 committed by GitHub
parent 8a23bccb70
commit 2951f0c40c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,8 +68,8 @@ WeatherProvider.register("weatherbit", {
// Implement WeatherDay generator.
generateWeatherDayFromCurrentWeather(currentWeatherData) {
//Calculate TZ Offset and invert to convert Sunrise/Sunset times to Local
var d = new Date();
var tzOffset = d.getTimezoneOffset();
const d = new Date();
let tzOffset = d.getTimezoneOffset();
tzOffset = tzOffset * -1;
const currentWeather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits);