GNU bug report logs -
#6453
coreutils: date -- Add new options for ISO 8601 date formats (-O)
Previous Next
To reply to this bug, email your comments to 6453 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#6453
; Package
coreutils
.
(Fri, 18 Jun 2010 07:58:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jari Aalto <jari.aalto <at> cante.net>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Fri, 18 Jun 2010 07:58:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Package: coreutils
Version: 8.5
Severity: wishlist
I'd like to suggest adding options to cover the typical ISO 8601 dates.
The options "O" seems to be free in date(1) manual page. Suggestions:
-O YYYY-MM-DD HH:MM (possibly most of then used)
-O::S YYYY-MM-DD HH:MM:SS
-O::T YYYY-MM-DD"T"HH:MM:SS (The canonical form)
The output can be produced using current option set:
%Y-%m-%d 1999-12-31
%Y-%j 1999-365
%G-W%V-%u 1999-W52-5
%H:%M:%S 23:59:59
but it would be nice to have a standrd "-O" option set specifically
designed from ISO dates.
Jari
References:
Standard - Date - ISO 9601 (Markus Kuhn)
http://www.cl.cam.ac.uk/~mgk25/iso-time.html
Standard - Date - ISO 8601 (Wikipedia)
http://en.wikipedia.org/wiki/ISO_8601
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#6453
; Package
coreutils
.
(Fri, 18 Jun 2010 15:00:04 GMT)
Full text and
rfc822 format available.
Message #8 received at 6453 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 06/18/2010 01:42 AM, Jari Aalto wrote:
> Package: coreutils
> Version: 8.5
> Severity: wishlist
>
>
> I'd like to suggest adding options to cover the typical ISO 8601 dates.
> The options "O" seems to be free in date(1) manual page. Suggestions:
Nope, O is already occupied per POSIX:
http://www.opengroup.org/onlinepubs/9699919799/utilities/date.html
For example, %Oe uses different numbers than %e in some locales.
And it is documented in 'date --help' (and therefore the date man page),
under the sentence: O to use the locale's alternate numeric symbols if
available.
> The output can be produced using current option set:
>
> %Y-%m-%d 1999-12-31
> %Y-%j 1999-365
> %G-W%V-%u 1999-W52-5
> %H:%M:%S 23:59:59
Unfortunately, it seems like building the ISO formats from their
components will be be best we can do, as adding % extensions is very
difficult to justify. However, given that we already have --rfc=2822
and --rfc-3339=TIMESPEC options that provide shortcuts for building
common RFC layouts, it may make sense to add a new command-line option
--iso-8601=TIMESPEC as shortcuts for building common ISO layouts.
> References:
>
> Standard - Date - ISO 9601 (Markus Kuhn)
Did you mean 8601?
--
Eric Blake eblake <at> redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#6453
; Package
coreutils
.
(Fri, 18 Jun 2010 17:45:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 6453 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
[let's keep the list/bug-tracker in the loop]
On 06/18/2010 11:31 AM, jari wrote:
> On 2010-06-18 08:58, Eric Blake wrote:
> | > I'd like to suggest adding options to cover the typical ISO 8601 dates.
> |
> | Nope, O is already occupied per POSIX:
>
> Ok.
>
> | common RFC layouts, it may make sense to add a new command-line option
> | --iso-8601=TIMESPEC as shortcuts for building common ISO layouts.
>
> That's even better and more straightforward as we need not to remember
> various % flags.
>
> Nice to know that the feature is considered to be included.
So, before anyone writes such a patch, what TIMESPEC options do you
propose would make the most sense for a new --iso-8601 command-line
option? And, seeing that RFC 3339 was derived from ISO 8601, do we even
need a new option, or is the existing behavior already present? In
other words, I'd still like to know what particular shortcuts you feel
are worth adding.
--
Eric Blake eblake <at> redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#6453
; Package
coreutils
.
(Fri, 18 Jun 2010 18:33:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 6453 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
[I repeat - PLEASE keep the list/bug-tracker in the loop, if you expect
anything to be done about your requests]
On 06/18/2010 12:18 PM, jari wrote:
> On 2010-06-18 11:43, Eric Blake wrote:
> | So, before anyone writes such a patch, what TIMESPEC options do you
> | propose would make the most sense for a new --iso-8601 command-line
> | option? And, seeing that RFC 3339 was derived from ISO 8601, do we even
> | need a new option, or is the existing behavior already present? In
> | other words, I'd still like to know what particular shortcuts you feel
> | are worth adding.
>
> I'm so used to 8601, so I dind't see the option --rfc-3339 from
> date(1) at first. Here are few commets:
>
>
> --rfc-3339=TIMESPEC
> output date and time in RFC 3339 format.
> TIMESPEC=`date', `seconds', or `ns' for date and time to
> the indicated precision. Date and time components are
> separated by a single space: 2006-08-07 12:34:56-06:00
>
> Additions to -rfc-3339 option
> -----------------------------
>
> Current:
>
> --rfc-3339="date" 2010-06-18
> --rfc-3339="seconds" 2010-06-18 21:08:05+03:00
>
> It would be nice to have also without timezone:
>
> --rfc-3339="time" 2010-06-18 21:08:00 (no TZ)
> --rfc-3339="word" 2010-06-18T21:08:00 (single word with seconds)
>
> New option --iso8601
> --------------------
>
> The 3339 is mostly unknown in the field, but almost everybody
> recognize 8601, so I'd like to suggest a shorthand for the most
> commonly used format (e,g, for log entries):
>
> --iso8601
>
> That would be same as the long option:
>
> --rfc-3339="time"
>
> Perhaps also "memory friendly":
>
> --iso8601="tz"
>
> Which would be equivalent for:
>
> --rfc-3339="seconds"
>
> Jari
>
>
>
--
Eric Blake eblake <at> redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 13 years and 323 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.