gtimezone: Add new constructor which can report errors

Add a new variant of `g_time_zone_new()` which returns `NULL` on
failure to load a timezone, rather than silently returning UTC.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #553
This commit is contained in:
Philip Withnall
2020-11-18 11:31:15 +00:00
parent fe5217bc2b
commit 8105c36e84
4 changed files with 68 additions and 17 deletions

View File

@@ -1939,6 +1939,7 @@ g_time_zone_unref
g_time_zone_ref
<SUBSECTION>
g_time_zone_new
g_time_zone_new_identifier
g_time_zone_new_local
g_time_zone_new_utc
g_time_zone_new_offset