GNU bug report logs -
#25086
[PATCH] Fix the timezone detection of parse-iso8601-time-string.
Previous Next
Reported by: Hong Xu <hong <at> topbug.net>
Date: Fri, 2 Dec 2016 03:48:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 2016-12-01 Thu 21:45 GMT-0800, Matt Armstrong <marmstrong <at> google.com> wrote:
> Hong Xu <hong <at> topbug.net> writes:
>
>> doc/misc/emacs-mime.texi | 3 +++
>> lisp/calendar/parse-time.el | 12 ++++++++----
>> src/editfns.c | 5 ++---
>> 3 files changed, 13 insertions(+), 7 deletions(-)
>
> Hi Hong, have you seen test/lisp/calendar/parse-time-tests.el? It might
> be nice to add test coverage for parse-iso8601-time-string there.
Thanks for the reminder. A patch to add tests is attached.
Note that I've kept the two patches separate since the one without tests
should be applied to the stable branch (since it has no test), but this
patch should be applied to master.
[parse-test.patch (text/x-diff, inline)]
diff --git a/test/lisp/calendar/parse-time-tests.el b/test/lisp/calendar/parse-time-tests.el
index 9bcf2b4a53c7..6b2b7af0694b 100644
--- a/test/lisp/calendar/parse-time-tests.el
+++ b/test/lisp/calendar/parse-time-tests.el
@@ -42,7 +42,15 @@
(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-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+02")
+ '(13818 19266))))
(provide 'parse-time-tests)
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 8 years and 201 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.