about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-04-07 11:10:41 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-04-07 11:10:41 +0200
commitd3a387a0ec6e5265f625de87318be2de610efb01 (patch)
treed33698386eded55c553da7658121d8d6679c98b9 /src
parent9aefbdcb5397540ec78d858006d76e2c1a0158f3 (diff)
downloadprofani-tty-d3a387a0ec6e5265f625de87318be2de610efb01.tar.gz
Downgrade dependencies
Use g_date_time_format() instead of g_date_time_format_iso8601() to only
rely on glib 2.56.0 which is the latest version in Debian Buster
(current stable).

We also only use basic sqlite functions so 3.27.0 should be fine there
(also the one in Debian buster).

Thanks to @DebXWoody.
Diffstat (limited to 'src')
-rw-r--r--src/database.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c
index 205b3a97..76f85a82 100644
--- a/src/database.c
+++ b/src/database.c
@@ -289,9 +289,15 @@ _add_to_db(ProfMessage *message, char *type, const Jid * const from_jid, const J
     gchar *date_fmt;
 
     if (message->timestamp) {
-        date_fmt = g_date_time_format_iso8601(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");
     } else {
-        date_fmt = g_date_time_format_iso8601(g_date_time_new_now_local());
+        // 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" );
     }
 
     const char *enc = _get_message_enc_str(message->enc);