--- /dev/null
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 6C535431FD2\r
+ for <notmuch@notmuchmail.org>; Mon, 23 Mar 2015 10:45:53 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.438\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
+ tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 40URh2cYGN4v for <notmuch@notmuchmail.org>;\r
+ Mon, 23 Mar 2015 10:45:50 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 1EF25431FC0\r
+ for <notmuch@notmuchmail.org>; Mon, 23 Mar 2015 10:45:50 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 916371000F4; Mon, 23 Mar 2015 19:45:24 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [DRAFT PATCH] emacs: show local date next to Date: in case value\r
+ differs\r
+Date: Mon, 23 Mar 2015 19:45:22 +0200\r
+Message-Id: <1427132722-20346-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.0.0\r
+Cc: tomi.ollila@iki.fi, Tomi Ollila <too@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 23 Mar 2015 17:45:53 -0000\r
+\r
+From: Tomi Ollila <too@iki.fi>\r
+\r
+When adding Date: header of a message to notmuch-show buffer, compare the\r
+date string with local representation of it and if these differ, output\r
+Date: {original-date-string} ({local-date-representation})\r
+\r
+This is useful e.g. when mail system provides Date: strings with\r
+different timezone information than the sender is located at.\r
+\r
+---\r
+ emacs/notmuch-show.el | 25 +++++++++++++++++++------\r
+ 1 file changed, 19 insertions(+), 6 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index f15f981..7e81859 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -460,15 +460,28 @@ (defun notmuch-show-insert-header (header header-value)\r
+ "Insert a single header."\r
+ (insert header ": " (notmuch-sanitize header-value) "\n"))\r
+ \r
+-(defun notmuch-show-insert-headers (headers)\r
++(defun notmuch--make-date (timestamp)\r
++ (if (> timestamp 2147483647)\r
++ (message-make-date (seconds-to-time timestamp))\r
++ (message-make-date (encode-time timestamp 0 0 1 1 1970 t))))\r
++\r
++(defun notmuch-show-insert-headers (headers &optional timestamp)\r
+ "Insert the headers of the current message."\r
+- (let ((start (point)))\r
++ (let ((start (point))\r
++ date-local)\r
+ (mapc (lambda (header)\r
+ (let* ((header-symbol (intern (concat ":" header)))\r
+ (header-value (plist-get headers header-symbol)))\r
+- (if (and header-value\r
+- (not (string-equal "" header-value)))\r
+- (notmuch-show-insert-header header header-value))))\r
++ (when (and header-value\r
++ (not (string-equal "" header-value)))\r
++ (if (and timestamp\r
++ (string-equal header "Date")\r
++ (not (string-equal\r
++ (setq date-local (notmuch--make-date timestamp))\r
++ header-value)))\r
++ (setq header-value\r
++ (format "%s (%s)" header-value date-local)))\r
++ (notmuch-show-insert-header header header-value))))\r
+ notmuch-message-headers)\r
+ (save-excursion\r
+ (save-restriction\r
+@@ -1012,7 +1025,7 @@ (defun notmuch-show-insert-msg (msg depth)\r
+ ;; Set `headers-start' to point after the 'Subject:' header to be\r
+ ;; compatible with the existing implementation. This just sets it\r
+ ;; to after the first header.\r
+- (notmuch-show-insert-headers headers)\r
++ (notmuch-show-insert-headers headers (plist-get msg :timestamp))\r
+ (save-excursion\r
+ (goto-char content-start)\r
+ ;; If the subject of this message is the same as that of the\r
+-- \r
+1.9.1\r
+\r