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




Reply via email to