Re: T is a mandatory date time separator in RFC3339 but documentation states differently

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: T is a mandatory date time separator in RFC3339 but documentation states differently
Дата
Msg-id piavtdd7mhmkpzpgvxaek3hz3e2kan3c2fitn5iqta6nyrpgyl@txongxshxkxw
обсуждение исходный текст
Ответ на Re: T is a mandatory date time separator in RFC3339 but documentation states differently  (Roman Frołow <rofrol@gmail.com>)
Ответы Re: T is a mandatory date time separator in RFC3339 but documentation states differently  (Erik Wienhold <ewie@ewie.name>)
Список pgsql-docs
On 2023-11-13 12:27 +0100, Roman Frołow wrote:
> It seems I was wrong.
> Now T is mandatory in ISO8601 and from RFC3339 it seems this requirement is
> relaxed.

Right.  RFC 3339 is from 2002 and it references ISO 8601:1988 where T
was optional.  (Until today I didn't even know about the 2019 edition.)
RFC 3339 made the separator mandatory and also permitted any character.

Also SQL only uses part of ISO 8601 (without specifying a particular
edition), namely the definition of UTC and date according to 3.1.4 in
Part 2 of the standard:

> 3.1.4 Definitions taken from ISO 8601
>
> For the purposes of this part of ISO/IEC 9075, the definitions of the
> following terms given in ISO 8601 apply:
>
> 3.1.4.1 Coordinated Universal Time (UTC)
> 3.1.4.2 date (date, calendar in ISO 8601)

I think the docs should clarify that "ISO 8601" in this case refers to a
subset of definitions as layed out in the SQL standard.  For example,
week date (SELECT '2023-W46-1'::date) is not accepted by Postgres, but
ordinal date (SELECT '2023-317'::date) is.

I also noticed that when people say "ISO 8601" they usually mean RFC
3389 or some subset of ISO 8601. [1]

[1] https://robinpokorny.com/blog/why-developers-should-stop-using-iso-8601-for-date-time/

-- 
Erik



В списке pgsql-docs по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: add new acronym "AM"
Следующее
От: Erik Wienhold
Дата:
Сообщение: Re: T is a mandatory date time separator in RFC3339 but documentation states differently