28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
|
From de6fd1a88d3f4004555738f5083d98700b4c3f0d Mon Sep 17 00:00:00 2001
|
||
|
From: AsciiWolf <mail@asciiwolf.com>
|
||
|
Date: Thu, 17 Jun 2021 13:28:16 +0200
|
||
|
Subject: [PATCH] Workaround serialization without icao libgweather issue
|
||
|
|
||
|
This workarounds libgweather#84
|
||
|
---
|
||
|
src/app/city.js | 3 ++-
|
||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/app/city.js b/src/app/city.js
|
||
|
index 7e9fa74..3777103 100644
|
||
|
--- a/src/app/city.js
|
||
|
+++ b/src/app/city.js
|
||
|
@@ -235,7 +235,8 @@ var WeatherWidget = GObject.registerClass({
|
||
|
this._apparentLabel.label = _('Feels like %.0f°').format(apparentValue);
|
||
|
|
||
|
let forecasts = info.get_forecast_list();
|
||
|
- let tz = GLib.TimeZone.new(info.location.get_timezone().get_tzid());
|
||
|
+ let coords = info.location.get_coords();
|
||
|
+ let tz = GLib.TimeZone.new(GWeather.Location.get_world().find_nearest_city(coords[0], coords[1]).get_timezone().get_tzid());
|
||
|
for (let t of ['hourly', 'daily'])
|
||
|
this._forecasts[t].update(forecasts, tz);
|
||
|
|
||
|
--
|
||
|
GitLab
|
||
|
|