diff options
author | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2022-03-04 17:55:48 +0300 |
---|---|---|
committer | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2022-03-04 17:55:48 +0300 |
commit | ef046b1e3594cccf226645824ff4ba78746cbf2f (patch) | |
tree | 6bfa38ef68956ad488fc7e1fbd32fd3b3b0b24d9 /src | |
parent | f6ad1006b6820577e0c99bf55c10ba1f0d82095e (diff) |
Deprecations and amend g_date_time_format_iso8601
@donoban g_date_time_format_iso8601 is available since 2.62
Diffstat (limited to 'src')
-rw-r--r-- | src/remmina_log.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/remmina_log.c b/src/remmina_log.c index e1bef0f2e..f8ac5e6d0 100644 --- a/src/remmina_log.c +++ b/src/remmina_log.c @@ -317,9 +317,15 @@ void _remmina_audit(const gchar *fun, const gchar *fmt, ...) gchar *text = g_strdup_vprintf(fmt, args); va_end(args); +#if GLIB_CHECK_VERSION(2,62,0) GDateTime* tv = g_date_time_new_now_local(); gchar *isodate = g_date_time_format_iso8601(tv); g_date_time_unref(tv); +#else + GTimeVal tv; + g_get_current_time(&tv); + gchar *isodate = g_time_val_to_iso8601(&tv); +#endif g_autofree gchar *buf = g_strdup(""); |