pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Datetime formatting
3+ messages / 3 participants
[nested] [flat]

* Datetime formatting
@ 2022-01-27 15:43  PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Doc comments form @ 2022-01-27 15:43 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: robert.kruus@gov.sk.ca

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/datatype-datetime.html
Description:

The latest ISO 8601-1:2019 standard requires the "T" character as the
separator in text representations of datetimes.  RFC 3339 is more flexible
and allows the space between the date and time. So technically, 
SELECT CAST('2021-02-13 06:00:00-06'::timestamptz AS TEXT);  ------>  
2021-02-13 06:00:00-06
is no longer considered valid under the latest edition, it would have to be 
  2021-02-13T06:00:00-06
I don't have access to the actual standard, but
https://ijmacd.github.io/rfc3339-iso8601/ seems to summarize it quite well,
and from what I could find publicly available.

Might want to make a note that the current behavior does not match the
latest standard, but does match previous editions and/or RFC 3339.
Or update the actual database behavior to match the new standard so no
documentation changes are required.


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Datetime formatting
@ 2022-01-27 16:26  David G. Johnston <david.g.johnston@gmail.com>
  parent: PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: David G. Johnston @ 2022-01-27 16:26 UTC (permalink / raw)
  To: robert.kruus@gov.sk.ca, Pg Docs <pgsql-docs@lists.postgresql.org>

On Thu, Jan 27, 2022 at 9:13 AM PG Doc comments form <noreply@postgresql.org>
wrote:

>
> Page: https://www.postgresql.org/docs/14/datatype-datetime.html
>
> Might want to make a note that the current behavior does not match the
> latest standard, but does match previous editions and/or RFC 3339.
>

We have such a note - it even gets printed in a big blue box.

"""
ISO 8601 specifies the use of uppercase letter T to separate the date and
time. PostgreSQL accepts that format on input, but on output it uses a
space rather than T, as shown above. This is for readability and for
consistency with RFC 3339 as well as some other database systems.
"""

David J.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* RE: Datetime formatting
@ 2022-01-27 16:41  Kruus, Robert SPSA <Robert.Kruus@gov.sk.ca>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Kruus, Robert SPSA @ 2022-01-27 16:41 UTC (permalink / raw)
  To: Pg Docs <pgsql-docs@lists.postgresql.org>

Sigh, I should just go home now...

From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Thursday, January 27, 2022 10:26 AM
To: Kruus, Robert SPSA <Robert.Kruus@gov.sk.ca>; Pg Docs <pgsql-docs@lists.postgresql.org>
Subject: Re: Datetime formatting

WARNING: This message originated from a source that is not managed by SaskBuilds and Procurement, Information Technology Division. Do not visit links or open attachments unless you trust the sender's email ID and ensure it is not a spam/phishing email.

On Thu, Jan 27, 2022 at 9:13 AM PG Doc comments form <noreply@postgresql.org<mailto:noreply@postgresql.org>> wrote:

Page: https://www.postgresql.org/docs/14/datatype-datetime.html<https://can01.safelinks.protection.outl...;

Might want to make a note that the current behavior does not match the
latest standard, but does match previous editions and/or RFC 3339.

We have such a note - it even gets printed in a big blue box.

"""
ISO 8601 specifies the use of uppercase letter T to separate the date and time. PostgreSQL accepts that format on input, but on output it uses a space rather than T, as shown above. This is for readability and for consistency with RFC 3339 as well as some other database systems.
"""

David J.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2022-01-27 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 15:43 Datetime formatting PG Doc comments form <noreply@postgresql.org>
2022-01-27 16:26 ` David G. Johnston <david.g.johnston@gmail.com>
2022-01-27 16:41   ` Kruus, Robert SPSA <Robert.Kruus@gov.sk.ca>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox