Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jul 2014 19:09:40 -0700
From:      Tim Kientzle <tim@kientzle.com>
To:        Garance A Drosehn <drosih@rpi.edu>
Cc:        sjg@freebsd.org, arch@freebsd.org, marcel@freebsd.org, phil@juniper.net, Simon Gerraty <sjg@juniper.net>
Subject:   Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML
Message-ID:  <C26E2F71-7CE1-4C05-BF06-5ACE7A2CECBB@kientzle.com>
In-Reply-To: <A1F5B4AA-0743-4F11-86EB-20DC1B877D46@rpi.edu>
References:  <20140725044921.9F0D3580A2@chaos.jnpr.net> <82CFA67F-BA93-44EE-BD4B-9105F89AD157@rpi.edu> <A1F5B4AA-0743-4F11-86EB-20DC1B877D46@rpi.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jul 30, 2014, at 6:45 PM, Garance A Drosehn <drosih@rpi.edu> wrote:

> On 30 Jul 2014, at 21:37, Garance A Drosehn wrote:
>>=20
>> [...]   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:
>>=20
>> #define LPD_TIMESTAMP_PATTERN    "%Y-%m-%dT%T%z %a"
>=20
>> 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.
>=20
> 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 =93profile of ISO8601=94
 * RFC3339 requires a timezone specifier
 * Both allow fractional seconds (period followed by one or more digits)
 * RFC3339 allows a timezone of =91-00:00=92; ISO8601 requires a =91+=92 =
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 =91Z=92.=20

=
http://stackoverflow.com/questions/522251/whats-the-difference-between-iso=
-8601-and-rfc-3339-date-formats

Tim




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C26E2F71-7CE1-4C05-BF06-5ACE7A2CECBB>