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
Message #26 received at 25086 <at> debbugs.gnu.org (full text, mbox):
> From: Hong Xu <hong <at> topbug.net>
> Date: Thu, 01 Dec 2016 20:04:00 -0800
>
> +;;;###autoload
> (defun parse-iso8601-time-string (date-string)
> + "Parse an ISO 8601 time string, such as 2016-12-01T23:35:06-05:00.
> +If DATE-STRING cannot be parsed, it falls back to
> +`parse-time-string'."
Why did you want to autoload this? The log message doesn't mention
this change at all.
> + '(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))))
Does this also test this part of your changes:
> @@ -204,13 +204,17 @@ parse-time-iso8601-regexp
> (date-time (concat full-date "T" full-time)))
> (list (concat "^" full-date)
> (concat "T" partial-time)
> - (concat "Z" time-numoffset)))
> + (concat "Z?" time-numoffset)))
If not, could you please add tests for that?
Thanks.
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.