Browse Source

org-odt.el: Format date strings in meta.xml using portable means

* contrib/lisp/org-odt.el (org-odt-format-date): %:z format
specifier of `format-time-string' is not portable.  Replace it
with an equivalent implementation using %z specifier.

Thanks to Anton Tarasenko for reporting this bug and verifying
this fix.  See
http://lists.gnu.org/archive/html/emacs-orgmode/2011-09/msg00099.html
Jambunathan K 13 years ago
parent
commit
0dd10f5d97
1 changed files with 2 additions and 1 deletions
  1. 2 1
      contrib/lisp/org-odt.el

+ 2 - 1
contrib/lisp/org-odt.el

@@ -1525,7 +1525,8 @@ visually."
       date)
      (t
       ;; ISO 8601 format
-      (format-time-string "%Y-%m-%dT%T%:z")))))
+      (let ((stamp (format-time-string "%Y-%m-%dT%H:%M:%S%z")))
+	(format "%s:%s" (substring stamp 0 -2) (substring stamp -2)))))))
 
 (defconst org-odt-manifest-file-entry-tag
   "