Differences between revisions 1 and 2
Revision 1 as of 2008-06-13 15:24:28
Size: 2428
Editor: BenFinney
Comment: New page to hold proposal and discussion of date+time format in Debian
Revision 2 as of 2008-06-13 19:11:06
Size: 2772
Editor: ?TeemuIkonen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
   Indeed using 'T' as a separator between date and time is rather ugly. If space should not be used, then an underscore would perhaps be the most readable alternative. An example datestring would be then {{{2008-06-13_21:06:36+02:00}}}. This would be RFC3339 compatible, since it allows any character to be used as separator. --TeemuIkonen

Debian commonly uses the date+time format specified in RFC 2822 http://www.ietf.org/rfc/rfc2822.txt for text date+time values in computer-parseable data.

However, there are formats with arguably better properties of both universality and parseability, namely those of ISO 8601 and derivatives like W3CDTF http://www.w3.org/TR/NOTE-datetime and RFC 3339 http://www.ietf.org/rfc/rfc3339.txt specifications.

This page discusses the proposal to change Debian's preferred date+time format to an ISO 8601 profile.


I don't think there's any reason to use the obsolete RFC 2822 time format in new standards. -- ?TeemuIkonen

  • I think this is a big change and needs to be discussed first. I don't see why you call RFC2822 an obsolete format, it is still used by many different technologies. Debain uses RFC2822 in many other places and I think it's very important to maintain consistency between things. Having one date format for debian/copyright but another date format for debian/changelog (for example) is a Bad Thing. If any change to the standard date format was made, it should be made across the board and preferably use something like W3CDTF. -- ?NoahSlater

    Hi Teemu, what is the command for genearting ISO 8601 dates? -- CharlesPlessy

In increasing order of precision and verbosity, the commands to get ISO 8601 date+time values (-- BenFinney):

$ date +'%F'
2008-06-13
$ date +'%FT%T'
2008-06-13T12:06:36
$ date +'%FT%T%:z'
2008-06-13T12:06:43+10:00
  • This is nitpicking, but I really find these dates disgracious (except the first one). How about using date  --rfc-3339=seconds instead if RFC2822 is not acceptable ? It gives an output like 2008-06-13 11:33:11+09:00. I unfortunately could not figure out if it is compliant with ISO 8601 or not. --CharlesPlessy

    • Indeed using 'T' as a separator between date and time is rather ugly. If space should not be used, then an underscore would perhaps be the most readable alternative. An example datestring would be then 2008-06-13_21:06:36+02:00. This would be RFC3339 compatible, since it allows any character to be used as separator. --?TeemuIkonen

    AFAICT, the W3CDTF standard is simply a specific profile of ISO 8601 formats. RFC 3339 also specifies one specific ISO 8601 profile. All three (ISO 8601, W3CDTF, RFC 3339) recommend no space separators; the date and time should be separated by a 'T' or 't' character. (RFC 3339 allows using a space separator "for the sake of readability".) -- BenFinney

    I will reiterate my point that changing the date format for Debian's packaging should be out of scope for Proposals/CopyrightFormat. -- ?NoahSlater

    Hopefully this separate page can engender a wider discussion. -- BenFinney