Philip Withnall 8945227743 gtimezone: Add g_time_zone_get_identifier() accessor
This is a non-trivial accessor which gets the identifier string used to
create the GTimeZone — unless the string passed to g_time_zone_new() was
invalid, in which case the identifier will be `UTC`.

Implementing this required reworking how timezone information was loaded
so that the tz->name is always set at the same time as tz->t_info, so
they are in sync. Previously, the tz->name was unconditionally set to
whatever was passed to g_time_zone_new(), and then not updated if the
tz->t_info was eventually set to the default UTC information.

This includes tests for the new g_time_zone_get_identifier() API, and
for the g_date_time_get_timezone() API added in the previous commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=795165
2018-04-12 13:25:16 +01:00
..
2017-07-13 19:03:39 -04:00
2012-04-23 02:46:18 +01:00
2012-08-03 23:36:45 -04:00
2000-12-05 20:43:58 +00:00
2000-12-05 20:43:58 +00:00
2000-12-05 20:43:58 +00:00
2000-12-05 20:43:58 +00:00
2016-07-16 20:32:16 -04:00
2018-02-15 11:25:53 +00:00
2002-11-23 01:37:17 +00:00