summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-04-29 09:39:35 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2013-04-29 09:39:35 +0200
commit1ce00aaffddc66e154893aed267fe05f06d56501 (patch)
tree7f5725e5344710ecdd3c7e93d2e1d8d6f2bf0f63
parent93da18174a562034e856d37b6c7e87a77c64608e (diff)
downloadorg-mode-1ce00aaffddc66e154893aed267fe05f06d56501.tar.gz
ox-publish: Fix "Invalid time specification" error with timestamps in DATE
* lisp/ox-publish.el (org-publish-find-date): Fix "Invalid time specification" error with timestamps in DATE.
-rw-r--r--lisp/ox-publish.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 194e169..cf428d1 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -829,7 +829,10 @@ modification time. Return time in `current-time' format."
(cond ((eq (org-element-type date) 'timestamp)
(org-time-string-to-time (org-element-interpret-data date)))
((let ((ts (and (consp date) (assq 'timestamp date))))
- (and ts (org-string-nw-p (org-element-interpret-data ts)))))
+ (and ts
+ (let ((value (org-element-interpret-data ts)))
+ (and (org-string-nw-p value)
+ (org-time-string-to-time value))))))
((file-exists-p file) (nth 5 (file-attributes file)))
(t (error "No such file: \"%s\"" file)))))