[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parse_datetime() and RFC 9557 suffixes
From: |
Bruno Haible |
Subject: |
Re: parse_datetime() and RFC 9557 suffixes |
Date: |
Thu, 01 Aug 2024 23:29:03 +0200 |
Hi Alejandro,
> $ date --date='2023-09-20[+0200]'
> date: invalid date ‘2023-09-20[+0200]’
Are you sure this is valid? In RFC 9557 [1] we have the ABNF rules
time-zone = "[" critical-flag time-zone-name / time-numoffset "]"
time-zone-name = time-zone-part *("/" time-zone-part)
and, since "date-time and time-numoffset are imported from Section 5.6
of [RFC3339]" [2]
time-numoffset = ("+" / "-") time-hour ":" time-minute
you should be using the string '2023-09-20[+02:00]', not '2023-09-20[+0200]'.
Bruno
[1] https://datatracker.ietf.org/doc/html/rfc9557#name-abnf
[2] https://datatracker.ietf.org/doc/html/rfc3339#section-5.6
- parse_datetime() and RFC 9557 suffixes, Alejandro Colomar, 2024/08/01
- Re: parse_datetime() and RFC 9557 suffixes,
Bruno Haible <=
- Re: parse_datetime() and RFC 9557 suffixes, Paul Eggert, 2024/08/01
- Re: parse_datetime() and RFC 9557 suffixes, Alejandro Colomar, 2024/08/02
- Re: date without time, Bruno Haible, 2024/08/02
- Re: date without time, Alejandro Colomar, 2024/08/02
- Re: date without time, Bruno Haible, 2024/08/02
- Re: date without time, Alejandro Colomar, 2024/08/02
- Re: date without time, Alejandro Colomar, 2024/08/03
- Re: date without time, Paul Eggert, 2024/08/03