XML Output: libxo - provide single API to output TXT, XML, JSON and HTML
Tim Kientzle
tim at kientzle.com
Thu Jul 31 02:09:45 UTC 2014
On Jul 30, 2014, at 6:45 PM, Garance A Drosehn <drosih at rpi.edu> wrote:
> On 30 Jul 2014, at 21:37, Garance A Drosehn wrote:
>>
>> [...] if you're going for machine-readable output then
>> you'd want that in some format which was much more specific and
>> *standard* (as opposed to arbitrary pretty-printed strings).
>> Something like the ISO 8601 format used in obscure parts of lpd:
>>
>> #define LPD_TIMESTAMP_PATTERN "%Y-%m-%dT%T%z %a"
>
>> Or you could follow the example of EDN, and use rfc-3339-format
>> (see '#inst' at https://github.com/edn-format/edn). The nice
>> thing about standards is that there are so many to choose from.
>
> I should note that these two formats are very similar, and in fact
> may be exactly the same.
Essentially, ISO8601 is the same as RFC3339 except that ISO8601
also has a bunch of additional notations for partial date/time,
durations, and repeat intervals.
Trivia:
* RFC3339 claims to be a “profile of ISO8601”
* RFC3339 requires a timezone specifier
* Both allow fractional seconds (period followed by one or more digits)
* RFC3339 allows a timezone of ‘-00:00’; ISO8601 requires a ‘+’ for a zero offset
> I kept meaning to see if there was any
> difference between them. I just noticed that the rfc has the 'Z'
> suffix as an option for a timezone, and I don't think that the ISO
> one does.
Both allow ‘Z’.
http://stackoverflow.com/questions/522251/whats-the-difference-between-iso-8601-and-rfc-3339-date-formats
Tim
More information about the freebsd-arch
mailing list