diff options
Diffstat (limited to 'lisp/org/ox-publish.el')
-rw-r--r-- | lisp/org/ox-publish.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index ba5a0232e42..80ef239b679 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el @@ -879,7 +879,8 @@ If FILE is an Org file and provides a DATE keyword use it. In any other case use the file system's modification time. Return time in `current-time' format." (let ((file (org-publish--expand-file-name file project))) - (if (file-directory-p file) (nth 5 (file-attributes file)) + (if (file-directory-p file) (file-attribute-modification-time + (file-attributes file)) (let ((date (org-publish-find-property file :date project))) ;; DATE is a secondary string. If it contains a time-stamp, ;; convert it to internal format. Otherwise, use FILE @@ -889,7 +890,8 @@ time in `current-time' format." (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))) + ((file-exists-p file) (file-attribute-modification-time + (file-attributes file))) (t (error "No such file: \"%s\"" file))))))) (defun org-publish-sitemap-default-entry (entry style project) @@ -1348,8 +1350,7 @@ does not exist." (expand-file-name (or (file-symlink-p file) file) (file-name-directory file))))) (if (not attr) (error "No such file: \"%s\"" file) - (+ (ash (car (nth 5 attr)) 16) - (cadr (nth 5 attr)))))) + (floor (float-time (file-attribute-modification-time attr)))))) (provide 'ox-publish) |