Serialization without icao looses timezone info
(affects python and the gnome script bindings in gnome weather app)
When serializing a location without specifing a icao code the timezone information is set. But lost after serializing followed by deserialzing.
- create detached location without icao code
- timezone info is correct
- serialize
- deserialize
- timezone info is gone.
I created a small python snippet which shows the issue
>>> from gi.repository import GWeather
>>>
>>> loc = GWeather.Location.new_detached('', None,50.088611, 14.421389);
>>> print(loc.get_name());
Prague
>>> print(loc.get_timezone_str());
Europe/Prague
>>> print(GWeather.Location.get_world().deserialize(loc.serialize()).get_timezone_str());
None <---- ISSUE
>>> print(GWeather.Location.get_world().deserialize(loc.serialize()).get_name());
Prague
>>>
>>> loc_with_icao = GWeather.Location.new_detached('', 'LKPR',50.088611, 14.421389);
>>> print(loc_with_icao.get_name());
Prague-Ruzyne Airport
>>> print(loc_with_icao.get_timezone_str());
Europe/Prague
>>> print(GWeather.Location.get_world().deserialize(loc_with_icao.serialize()).get_timezone_str());
Europe/Prague
>>> print(GWeather.Location.get_world().deserialize(loc_with_icao.serialize()).get_name());
Prague-Ruzyne Airport
This creates crashes in gnome weather because the timezone info is null See gnome-weather#127 (closed)