[Commits] [SCM] claws branch, master, updated. 3.18.0-116-gae4519307
jonathan at claws-mail.org
jonathan at claws-mail.org
Mon Sep 13 04:36:38 CEST 2021
The branch, master has been updated
via ae4519307d4133281f8f706c3a83a6b738007a59 (commit)
from 69f0c0e7000e8d6cb2803a8b923c8b413ce20e7c (commit)
Summary of changes:
src/procheader.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit ae4519307d4133281f8f706c3a83a6b738007a59
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date: Sun Sep 12 03:09:55 2021 -0700
Fix messageview_date_format on Windows
Bug 4535 'Setting msgview_date_format=1 does not work'
Call procheader_date_get_localtime() for Windows as well.
Also fix deprecation warning for g_time_zone_new()
diff --git a/src/procheader.c b/src/procheader.c
index a1fb53092..653a000fb 100644
--- a/src/procheader.c
+++ b/src/procheader.c
@@ -1130,7 +1130,13 @@ time_t procheader_date_parse(gchar *dest, const gchar *src, gint len)
GTimeZone *tz;
GDateTime *dt, *dt2;
+#if GLIB_CHECK_VERSION(2,68,0)
+ tz = g_time_zone_new_identifier(zone);
+ if (tz == NULL)
+ tz = g_time_zone_new_utc();
+#else
tz = g_time_zone_new(zone); // can't return NULL no need to check for it
+#endif
dt = g_date_time_new(tz, 1, 1, 1, 0, 0, 0);
g_time_zone_unref(tz);
dt2 = g_date_time_add_full(dt, year-1, dmonth-1, day-1, hh, mm, ss);
@@ -1166,9 +1172,9 @@ time_t procheader_date_parse(gchar *dest, const gchar *src, gint len)
if (tz_offset != -1)
timer += tzoffset_sec(&timer) - tz_offset;
+#endif
if (dest)
procheader_date_get_localtime(dest, len, timer);
-#endif
return timer;
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list