On 13.03.2010 23:34, Marshall Eubanks wrote:
On Mar 13, 2010, at 1:30 PM, Stephane Bortzmeyer wrote:
On Sat, Mar 13, 2010 at 10:06:46AM -0500,
Marshall Eubanks <tme@xxxxxxxxxxxxxx> wrote
a message of 61 lines which said:
This follows an ISO standard, ISO 8601,
Sections 5.5 of RFC 3339 explain very well why you should not use ISO
8601 but its subset of RFC 3339.
and also happens to sort properly (in time order).
ISO 8601 does not really have this property, see section 5.1 of RFC
3339.
Why not ? The complete 5.1 from RFC 3339
5.1.
Ordering If date and time components are ordered from least precise to
most precise, then a useful property is achieved. Assuming that the time
zones of the dates and times are the same (e.g., all in UTC), expressed
using the same string (e.g., all "Z" or all "+00:00"), and all times
have the same number of fractional second digits, then the date and time
strings may be sorted as strings (e.g., using the strcmp() function in
C) and a time-ordered sequence will result. The presence of optional
punctuation would violate this characteristic.
-----
Also, note that we are talking about _dates_. While daylight savings
time may complicate time sortability, it won't affect date sortability.
> ...
I think the answer is that you need to select a consistent profile of
ISO-8601 if you want to use string sorting. This is true both for ISO
8691 and the subset in in RFC 3339, the only difference seems to be that
there are less options to consider.
Best regards, Julian
_______________________________________________
Ietf mailing list
Ietf@xxxxxxxx
https://www.ietf.org/mailman/listinfo/ietf