[gnome-clocks] world-item: Get TimeZone directly
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] world-item: Get TimeZone directly
- Date: Fri, 7 Jan 2022 17:23:44 +0000 (UTC)
commit 0e913b531d650a81d294cefde23c0db6e5fda342
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Mon Dec 13 15:40:51 2021 +0100
world-item: Get TimeZone directly
src/world-item.vala | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
---
diff --git a/src/world-item.vala b/src/world-item.vala
index c2f61b37..b45a77ac 100644
--- a/src/world-item.vala
+++ b/src/world-item.vala
@@ -216,16 +216,7 @@ public class Item : Object, ContentItem {
public Item (GWeather.Location location) {
Object (location: location);
- var weather_time_zone = location.get_timezone_str ();
- if (weather_time_zone != null) {
- time_zone = new GLib.TimeZone.identifier ((string) weather_time_zone);
- if (time_zone == null) {
- warning ("Unrecognised timezone %s",
- (string) weather_time_zone);
- }
- } else {
- warning ("Failed to get a timezone for %s", location.get_name ());
- }
+ time_zone = location.get_timezone ();
tick ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]