Date/Time parsing of ISO 8601 timestamps with commas
Zane Duffield <duffieldzane@gmail.com>
From: Zane Duffield <duffieldzane@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Date: 2025-10-09T23:43:04Z
Lists: pgsql-bugs
I noticed today that PostgreSQL doesn't support parsing ISO 8601 timestamps that use a comma as the decimal separator. The section of the standard that describes this is 4.2.2.4 > the decimal fraction shall be divided from the integer part by the decimal > sign specified in ISO 31-0, i.e. the comma [,] or full stop [.]. Of these, > the comma is the preferred sign > I noticed this issue because a script I wrote used the unix `date` command to generate a timestamp (later fed into PostgreSQL) > $ date --iso-8601=ns > 2025-10-10T10:38:59,386724473+11:00 I read over the documentation for Date/Time types: https://www.postgresql.org/docs/18/datatype-datetime.html > Date and time input is accepted in almost any reasonable format, including > ISO 8601 but there is no clarification on this page that the comma is not supported as the decimal separator. Thanks, Zane