Feature #643
closeddate -R support would be helpful
100%
Description
This is a request for a GNUism. It is used by certain debian scripts like dch:
-R, --rfc-2822 output date and time in RFC 2822 format.
Example: Mon, 07 Aug 2006 12:34:56 -0600
--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
I'd be happy with just -R, although I can see that the other option may be quite useful as well.
Also, I notice that GNU date has %N, which is a time in nanoseconds. Perhaps this would be useful to obtain high resolution times?
Related issues
Updated by Roland Mainz about 12 years ago
For the log:
-R is basically the format "%a, %-e %h %Y %H:%M:%S %z". The only issue is to check whether any of these strings is subject to localisation.
Updated by Alexander Eremin almost 12 years ago
- Assignee changed from Alexander Eremin to Roland Mainz
Updated by Garrett D'Amore almost 12 years ago
- Difficulty set to Medium
- Tags set to needs-triage
As documented, date -R is rfc 822, and that is not subject to localization.
Updated by Garrett D'Amore almost 12 years ago
Furthermore, Linux date behaves with -R as:
"%a, %d %h %Y %H:%M:%S %z"
(Note that %d instead of %-e.) This is verified with
velocity{12}> date --version
date (GNU coreutils) 8.5
Updated by Garrett D'Amore almost 12 years ago
- Assignee changed from Roland Mainz to Garrett D'Amore
Taking this away from Roland due to lack of progress. I have a diff ready.
Updated by Garrett D'Amore almost 12 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
- Difficulty changed from Medium to Bite-size
Fixed in:
changeset: 13359:10bc9c3abe6e
tag: tip
user: Garrett D'Amore <garrett@nexenta.com>
date: Mon May 02 11:46:10 2011 -0700
description:
643 date -R support would be helpful
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Kartik Mistry <kartik@nexenta.com>
Reviewed by: Rich Lowe <richlowe@richlowe.net>
Approved by: Gordon Ross <gwr@nexenta.com>