Fri, 31 Dec 2021 03:34:12 -0600
Replace g_time_zone_new by g_time_zone_new_identifier
The former calls the latter with a fallback to UTC, but is deprecated, so we're going to do the same for now (though maybe we should fall back to our normal `tz == NULL` handling?)
Testing Done:
Compiled.
Reviewed at https://reviews.imfreedom.org/r/1211/
| libpurple/util.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/util.c Fri Dec 31 03:03:12 2021 -0600 +++ b/libpurple/util.c Fri Dec 31 03:34:12 2021 -0600 @@ -411,11 +411,17 @@ if (str != end) { /* Trim anything trailing a purely numeric time zone. */ gchar *tzstr = g_strndup(str, end - str); - tz = g_time_zone_new(tzstr); + tz = g_time_zone_new_identifier(tzstr); g_free(tzstr); + if (tz == NULL) { + tz = g_time_zone_new_identifier("UTC"); + } } else { /* Just try whatever is there. */ - tz = g_time_zone_new(str); + tz = g_time_zone_new_identifier(str); + if (tz == NULL) { + tz = g_time_zone_new_identifier("UTC"); + } } } }