Closed pwithnall closed 2 years ago
Thanks. I ended up using your g_time_zone_new_identifier() recommendation.
Can you let the person who originally filed the bug report that I will make a new release with the bug fix "soon" (next few days)? Thanks!
It's me, and understood, thanks!
No prob!
Fuuuuuuuuuuu... new base64 decoder was broken.
Releasing 3.2.11. Gah!
This is part of https://gitlab.gnome.org/GNOME/glib/-/issues/2620, which in turn came from Debian bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1007226.
Calling
g_time_zone_new_offset()
with a large offset (>24h) will cause an assertion failure in GLib <2.72.0. There’s a fix for GLib 2.72.0, but older versions of GLib will still have this (or a different) assertion failure.g_time_zone_new_offset()
isn’t an ideal API, in that it has no way of reporting errors, and not all timezone offsets are valid. Currently there is no direct replacement.You have several options, depending on what makes the most sense for how GMime handles timezones internally:
g_time_zone_new_offset()
. The downside is that I can’t say for certain that offsets <24h will be valid, as the validity depends on what’s defined in the system tzdbg_time_zone_new_offset()
to see if it’s the UTC timezone. If it is, and that wasn’t expected (i.e. the offset wasn’t 0), then creating the timezone failed.g_time_zone_new_identifier()
instead, asg_time_zone_new_offset()
does internally. It can report errors.