unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Hong Xu <hong@topbug.net>
Cc: 25086@debbugs.gnu.org
Subject: bug#25086: [PATCH] Fix the timezone detection of parse-iso8601-time-string.
Date: Sat, 17 Dec 2016 16:58:06 +0200	[thread overview]
Message-ID: <837f6y7gch.fsf@gnu.org> (raw)
In-Reply-To: <8737i7yo27.fsf@topbug.net> (message from Hong Xu on Thu, 01 Dec 2016 20:04:00 -0800)

> From: Hong Xu <hong@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.





  parent reply	other threads:[~2016-12-17 14:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02  3:46 bug#25086: [PATCH] Fix the timezone detection of parse-iso8601-time-string Hong Xu
2016-12-02  3:55 ` Hong Xu
2016-12-02  4:04   ` Hong Xu
     [not found]     ` <qf5fum6ubn4.fsf@marmstrong-macbookpro.roam.corp.google.com>
2016-12-02  6:13       ` Hong Xu
2016-12-12  0:37         ` Hong Xu
2016-12-12 17:22           ` Matt Armstrong
2016-12-12 17:58             ` Eli Zaretskii
2016-12-17 14:58     ` Eli Zaretskii [this message]
2016-12-17 20:42       ` Hong Xu
2016-12-18  3:11         ` Hong Xu
2016-12-24 12:41           ` Eli Zaretskii
2016-12-24 21:04             ` Hong Xu
2016-12-25  3:29               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=837f6y7gch.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25086@debbugs.gnu.org \
    --cc=hong@topbug.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).