diff options
| author | Arun Isaac | 2025-11-13 23:06:34 +0000 |
|---|---|---|
| committer | Arun Isaac | 2025-11-13 23:07:45 +0000 |
| commit | 849c9cd3e8971c2f468e7281599d0370c1d0f049 (patch) | |
| tree | e522987bdbdc268d7d3771ed6ea9ff1ca52a2344 /ennum.el | |
| parent | f43cd8b14ec3c90cac81f717a7bf1609f985fcfd (diff) | |
| download | ennum-849c9cd3e8971c2f468e7281599d0370c1d0f049.tar.gz ennum-849c9cd3e8971c2f468e7281599d0370c1d0f049.tar.lz ennum-849c9cd3e8971c2f468e7281599d0370c1d0f049.zip | |
Handle time zone information in Atom feed dates.
Diffstat (limited to 'ennum.el')
| -rw-r--r-- | ennum.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ennum.el b/ennum.el index c6282f1..c2c1054 100644 --- a/ennum.el +++ b/ennum.el @@ -634,8 +634,13 @@ result as a string." (ennum-setting :blog-domain) path)) -(defun ennum--atom-date (date) - (format-time-string "%Y-%m-%dT%H:%M:%SZ" date)) +(defun ennum--atom-date (date &optional zone) + ;; Atom uses the RFC 3339 date format. + (let ((zone-string (format-time-string "%z" date zone))) + (concat (format-time-string "%Y-%m-%dT%H:%M:%S" date) + (substring zone-string 0 3) + ":" + (substring zone-string 3)))) (defun ennum-publish-feed (feed-file title rights posts) (let ((interned-post-files |
