[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#569174: [PATCH] Correction of RFC number for date format -- bug #569174.



"Giacomo A. Catenazzi" <cate@debian.org> writes:

> There are some differences (usually backward compatible).  The main
> difference I see is: RFC 5322 doesn't permit comments before and after
> month name, so really an insignificant change for Debian.

> OTOH we don'twant to have the full range of options, e.g. the tree RFCs
> permits the 2 digit year (check obs-year), it permits to leave off the
> day-of-week, it permits to use the "obsolete" time zones, etc.  So I
> propose to define "date" field explicitly:

This is a good point, and after further consideration I agree with Giacomo
that being explicit is probably a good idea.  There's a bunch of
historical baggage in the mail standards that we don't support for
changelog entries.

> ====
> The date has the following format (compatible and with the same semantic
> of RFC 2822 and RFC 5322):

> day-of-week, dd month yyyy hh:mm:ss +zzzz

> where:
> - day-of week is one of: Mon, Tue, Wed, Thu, Fri, Sat, Sun

The day of the week is optional in RFC 5322 and in RFC 822.  Should it be
optional in our grammar as well?

> - dd is 2 digist (01-31)

- dd is a one- or two-digit day of the month (01-31)

I'm pretty sure none of our software explodes if there isn't a leading
zero and RFC 822 allkows one-digit days of the month (as opposed to hours,
which have always been required to have two digits).

> - month is one of:  Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov,
> Dec
> - yyyy is 4 digits (e.g. 2010)

- yyyy is the four-digit year (e.g. 2010)

> - hh is 2 digits (00-24)
> - mm is 2 digits (00-59)
> - ss is 2 digits (00-61)

- hh is the two-digit hour (00-23)
- mm is the two-digit minutes (00-59)
- ss is the two-digit seconds (00-60)

Some specifications allow the ambiguous 00 vs. 24 designation of midnight,
but we probably shouldn't.  Allowing seconds to be 61 is a POSIX bug that
we don't need to duplicate; there will never be more than one leap second
added in a given hour.

> - +zzzz (or -zzzz) is a sign (+ or 0) followed by 4 digits.

- +zzzz or -zzzz is the the time zone offset from Coordinated Universal
  Time (UTC).  "+" indicates that the time is ahead of (i.e., east of) UTC
  and "-" indicates that the time is behind (i.e., west of) UTC.  The
  first two digits indicate the hour difference from UTC and the last
  two digits indicate the number of additional minutes difference from
  UTC.  The last two digits must be in the range 00-59.

If someone put this into SGML, I'd second it.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: