Skip to content

location: Add getter for time zone name

Emmanuele Bassi requested to merge ebassi/issue-161 into main

When I removed GWeatherTimezone I inadvertedly missed the only functionality that the type provided on top of GTimeZone, and that is: the ability to retrieve the human readable, localised name of the time zone bound to a location. That information does not exist in the time zone database as parsed by GLib, but it is available in GWeather's location database. This means we need to retrieve the time zone reference from the location's database, just like we do for gweather_location_get_timezone(), and from that reference we retrieve the localised string with the time zone name.

The old GWeather-3 API allowed retrieving the name for any given GWeatherTimezone, but since all time zones are bound to a location, we can skip that particular aspect of the API.

Fixes: #161

Merge request reports