Use g_date_time_format_iso8601()

This partly reverts d3a387a0ec.

For proanity 0.9.x we still wanted to support older glib versions so
that we can be packaged for various linux distros.

Now with 0.10 we want to move on.
This commit is contained in:
Michael Vetter
2020-09-30 19:41:18 +02:00
parent 17b1b431f5
commit 7f5169c2e9
2 changed files with 4 additions and 10 deletions

View File

@@ -316,15 +316,9 @@ _add_to_db(ProfMessage* message, char* type, const Jid* const from_jid, const Ji
gchar* date_fmt;
if (message->timestamp) {
// g_date_time_format_iso8601() is only availble from glib 2.62 on.
// To still support Debian buster lets use g_date_time_format() for now.
//date_fmt = g_date_time_format_iso8601(message->timestamp);
date_fmt = g_date_time_format(message->timestamp, "%FT%T%:::z");
date_fmt = g_date_time_format_iso8601(message->timestamp);
} else {
// g_date_time_format_iso8601() is only availble from glib 2.62 on.
// To still support Debian buster lets use g_date_time_format() for now.
//date_fmt = g_date_time_format_iso8601(g_date_time_new_now_local());
date_fmt = g_date_time_format(g_date_time_new_now_local(), "%FT%T%:::z");
date_fmt = g_date_time_format_iso8601(g_date_time_new_now_local());
}
const char* enc = _get_message_enc_str(message->enc);