about summary refs log tree commit diff
path: root/third_party/notmuch/dottime.patch
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-27T18·16+0100
committerVincent Ambo <tazjin@google.com>2019-12-27T18·18+0100
commit1ea6dcabbb097ab7f4f57630c41f58b4df549095 (patch)
treeeace0b878700a7d268ce668db826053c2a3dca2a /third_party/notmuch/dottime.patch
parent08dd267c19fcc224a48c2f5a5c0dacb7f8b8acea (diff)
feat(third_party/notmuch): Patch notmuch to render time as dottime r/315
This implements support for dotti.me in notmuch by changing the
formatting of relative and absolute times.
Diffstat (limited to 'third_party/notmuch/dottime.patch')
-rw-r--r--third_party/notmuch/dottime.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/third_party/notmuch/dottime.patch b/third_party/notmuch/dottime.patch
index 147ee3b4118b..c9e0159ca242 100644
--- a/third_party/notmuch/dottime.patch
+++ b/third_party/notmuch/dottime.patch
@@ -33,3 +33,31 @@ index 2734b36a..b1ec4bdc 100644
  		return result;
  	    }
  	}
+diff --git a/util/gmime-extra.c b/util/gmime-extra.c
+index d1bb1d47..9df5a454 100644
+--- a/util/gmime-extra.c
++++ b/util/gmime-extra.c
+@@ -124,7 +124,10 @@ g_mime_message_get_date_string (void *ctx, GMimeMessage *message)
+ {
+     GDateTime* parsed_date = g_mime_message_get_date (message);
+     if (parsed_date) {
+-	char *date = g_mime_utils_header_format_date (parsed_date);
++	char *date = g_date_time_format(
++		parsed_date,
++		"%a, %d %b %Y %H·%M%z"
++	);
+ 	return g_string_talloc_strdup (ctx, date);
+     } else {
+ 	return talloc_strdup(ctx, "Thu, 01 Jan 1970 00:00:00 +0000");
+diff --git a/util/gmime-extra.h b/util/gmime-extra.h
+index b0c8d3d8..40f748f8 100644
+--- a/util/gmime-extra.h
++++ b/util/gmime-extra.h
+@@ -1,5 +1,7 @@
+ #ifndef _GMIME_EXTRA_H
+ #define _GMIME_EXTRA_H
++#include <glib.h>
++#include <glib/gprintf.h>
+ #include <gmime/gmime.h>
+ #include <talloc.h>
+