~patrickhaussmann/weather.app.5ls.de

7b0a5fea1bc6b242c441f717ac294ec936b5b8f4 — patrickhaussmann 1 year, 6 months ago a507a3e
only show update time of openweathermap
1 files changed, 0 insertions(+), 4 deletions(-)

M show.js
M show.js => show.js +0 -4
@@ 1701,10 1701,6 @@ async function main() {
  Promise.all([promiseOpenweathermap, promiseOpenMeteo]).then(
    ([openweathermapData, openMeteoData]) => {
      updateLastUpdateIfOlder(new Date(openweathermapData.current.dt * 1000));
      const openMeteoUpdateTime = openMeteoData.current_weather.time * 1000;
      if (new Date() - openMeteoUpdateTime > 11 * relativeTime.UNITS.minute)
        // openMeteo date it is only updated every 10min and the current section uses openweathermap anyway
        updateLastUpdateIfOlder(new Date(openMeteoUpdateTime));

      if (!place.timezone) place.timezone = openweathermapData.timezone;
      if (!place.elevation) place.elevation = openMeteoData.elevation;