On 2016-12-17 Sat 06:58 GMT-0800, Eli Zaretskii wrote: >> From: Hong Xu >> 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. The attached new version now fixes this issue in the log message. It autoloads because parse-time-string autoloads -- If parse-time-string is useful for autoloading, there is no reason that parse-iso8601-time-string is not useful for that. > >> + '(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? > I've added the tests now. And indeed, it exposes a bug in the original patch. Again, I decomposed the patch to two different parts, one for the stable branch and the other (with only test files) for the master branch.