diff options
author | Hong Xu <hong@topbug.net> | 2016-12-24 14:35:12 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2016-12-24 14:35:12 +0200 |
commit | 25c9cb77b4346c9912c995ca3a63fc7ab424795e (patch) | |
tree | 1b450c512afd6cbd8cbd3519797369c16accb1cb /test/lisp/calendar | |
parent | e36a3882c338765a9ddfebfc160e5a298933f233 (diff) | |
download | emacs-25c9cb77b4346c9912c995ca3a63fc7ab424795e.tar.gz emacs-25c9cb77b4346c9912c995ca3a63fc7ab424795e.tar.bz2 emacs-25c9cb77b4346c9912c995ca3a63fc7ab424795e.zip |
Fix timezone detection of parse-iso8601-time-string
* parse-time.el (parse-iso8601-time-string): Fix timezone
parsing. Add a doc string. (Bug#25086)
* editfns.c (Fdecode-time): Doc fix.
* emacs-mime.texi (time-date): Add an example for
parse-iso8601-time-string.
* parse-time-tests.el (parse-time-tests): Add tests for
parse-iso8601-time-string.
Diffstat (limited to 'test/lisp/calendar')
-rw-r--r-- | test/lisp/calendar/parse-time-tests.el | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/lisp/calendar/parse-time-tests.el b/test/lisp/calendar/parse-time-tests.el index 9bcf2b4a53c..6dc23372f24 100644 --- a/test/lisp/calendar/parse-time-tests.el +++ b/test/lisp/calendar/parse-time-tests.el @@ -42,7 +42,23 @@ (should (equal (parse-time-string "Monday, 22 february 2016 19:35:42 +0100") '(42 35 19 22 2 2016 1 nil 3600))) (should (equal (parse-time-string "Monday, 22 february 2016 19:35:42 PDT") - '(42 35 19 22 2 2016 1 t -25200)))) + '(42 35 19 22 2 2016 1 t -25200))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54-0200") + '(13818 33666))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54-0230") + '(13818 35466))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54-02:00") + '(13818 33666))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54-02") + '(13818 33666))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54+0230") + '(13818 17466))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54+02") + '(13818 19266))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54Z") + '(13818 26466))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54") + (encode-time 54 21 12 12 9 1998)))) (provide 'parse-time-tests) |