[balsa/gmime3: 30/50] New API for g_mime_utils_header_decode_date()



commit 81682cbfb5144e2430446ca20f134758baf067d4
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Fri Nov 22 14:54:10 2019 -0800

    New API for g_mime_utils_header_decode_date()
    
    modified:   libbalsa/message.c

 libbalsa/message.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/libbalsa/message.c b/libbalsa/message.c
index 315d68255..94de6270c 100644
--- a/libbalsa/message.c
+++ b/libbalsa/message.c
@@ -1231,7 +1231,11 @@ lbmsg_set_header(LibBalsaMessage *message,
         libbalsa_message_set_subject_from_header(message, value);
 #endif /* MESSAGE_COPY_CONTENT */
     } else if (g_ascii_strcasecmp(name, "Date") == 0) {
-        message->headers->date = g_mime_utils_header_decode_date(value, NULL);
+        GDateTime *datetime;
+
+        datetime = g_mime_utils_header_decode_date(value);
+        message->headers->date = g_date_time_to_unix(datetime);
+        g_date_time_unref(datetime);
     } else if ((message->headers->from == NULL) &&
                (g_ascii_strcasecmp(name, "From") == 0)) {
         message->headers->from = internet_address_list_parse(libbalsa_parser_options(), value);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]