GNU bug report logs - #10455
Date: Possible bug in ISO-8601 formatted dates

Previous Next

Package: coreutils;

Reported by: Dotan Cohen <dotancohen <at> gmail.com>

Date: Sun, 8 Jan 2012 19:13:02 UTC

Severity: normal

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 10455 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: Dotan Cohen <dotancohen <at> gmail.com>
Cc: 10455 <at> debbugs.gnu.org
Subject: Re: bug#10455: Date: Possible bug in ISO-8601 formatted dates
Date: Sun, 8 Jan 2012 23:49:27 -0700
Dotan Cohen wrote:
> It seems that ISO-8601 formated dates are not properly handled by the
> date utility.

GNU date didn't learn how to handle ISO-8601 until very recently.
Your version 8.5 doesn't have that code yet.  Here is the NEWS file
entry for the change as it went into the recent 8.13 release.

* Noteworthy changes in release 8.13 (2011-09-08) [stable]

** New features

  date now accepts ISO 8601 date-time strings with "T" as the
  separator.  It has long parsed dates like "2004-02-29 16:21:42"
  with a space between the date and time strings.  Now it also parses
  "2004-02-29T16:21:42" and fractional-second and time-zone-annotated
  variants like "2004-02-29T16:21:42.333-07:00"

And here is the ChangeLog entry:

        date: support parsing of ISO-8601-with-"T" dates
        Thanks to an improvement in gnulib's parse-datetime module,
        commands like this now succeed (output manually indented):
            $ ./date -u -d 2004-02-29T16:21:42.33+07:00 +%FT%T.%N%z
                           2004-02-29T09:21:42.330000000+0000
        * tests/misc/date: Add a test to exercise the new-in-gnulib
        parsing of ISO8601-with-"T" dates.
        * NEWS (New features): Mention it.
        * gnulib: Update, to pull in this parse-datetime improvement.

Bob




This bug report was last modified 13 years and 139 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.