From 7dd9767a8eca66bb40660d8d77c258b60d08d4df Mon Sep 17 00:00:00 2001 From: JSDurand Date: Tue, 30 Aug 2022 11:19:30 +0800 Subject: org: fix date * org-conf.el (durand-org-postamble): Previously I always use the date and time at the moment of exporting the document as the document's creation time. While technically correct, this is not what the reader wants to know. So I figured out how to obtain the correct date and time information in the postamble function. --- org-conf.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org-conf.el b/org-conf.el index 142f8ac..9e31b92 100644 --- a/org-conf.el +++ b/org-conf.el @@ -585,7 +585,7 @@ href='https://jsdurand.xyz/favicon.ico'/>") ;;;; Custom postamble -(defun durand-org-postamble (_plist) +(defun durand-org-postamble (plist) "Return the postamble string. PLIST specifies the settings of the project. @@ -594,7 +594,9 @@ that argument." (let ((author "JSDurand") (email " durand@jsdurand.xyz") - (created (format-time-string "%F %a %T %Z")) + (created (org-export-data + (org-export-get-date plist "%F %a %T %Z") + plist)) (creator (format "%s (Org mode %s)" -- cgit v1.2.3-18-g5258