about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-10-05 09:59:11 +0200
committerGitHub <noreply@github.com>2021-10-05 09:59:11 +0200
commit7e8cf4a3d680ef5b8f056021846818fb526635d9 (patch)
tree28518fa93bd5cfde2a1048619b236d569aeb2c0b
parentce5bf721cad03ce660b1c365e0d96d58c90dcf51 (diff)
parent97551aa1318fd294c38ceb4339c23a7f2a590915 (diff)
downloadprofani-tty-7e8cf4a3d680ef5b8f056021846818fb526635d9.tar.gz
Merge pull request #1600 from MarcoPolo-PasTonMolo/fix/history-timestamp
Fix history timestamp
-rw-r--r--src/xmpp/stanza.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c
index 604d4003..b1bc8f94 100644
--- a/src/xmpp/stanza.c
+++ b/src/xmpp/stanza.c
@@ -1180,9 +1180,9 @@ _stanza_get_delay_timestamp_xep0203(xmpp_stanza_t* const delay_stanza)
 
         if (stamp && (g_time_val_from_iso8601(stamp, &utc_stamp))) {
 
-            GDateTime* utc_datetime = g_date_time_new_from_timeval_utc(&utc_stamp);
-            GDateTime* local_datetime = g_date_time_to_local(utc_datetime);
-            g_date_time_unref(utc_datetime);
+            GDateTime* datetime = g_date_time_new_from_iso8601(stamp, NULL);
+            GDateTime* local_datetime = g_date_time_to_local(datetime);
+            g_date_time_unref(datetime);
 
             return local_datetime;
         }
@@ -1201,9 +1201,9 @@ _stanza_get_delay_timestamp_xep0091(xmpp_stanza_t* const x_stanza)
         const char* stamp = xmpp_stanza_get_attribute(x_stanza, STANZA_ATTR_STAMP);
         if (stamp && (g_time_val_from_iso8601(stamp, &utc_stamp))) {
 
-            GDateTime* utc_datetime = g_date_time_new_from_timeval_utc(&utc_stamp);
-            GDateTime* local_datetime = g_date_time_to_local(utc_datetime);
-            g_date_time_unref(utc_datetime);
+            GDateTime* datetime = g_date_time_new_from_iso8601(stamp, NULL);
+            GDateTime* local_datetime = g_date_time_to_local(datetime);
+            g_date_time_unref(datetime);
 
             return local_datetime;
         }