Skip to content

Commit

Permalink
Allow lower case "t" and "z" in datetimes (#149)
Browse files Browse the repository at this point in the history
* Allow lower case "t" and "z" in datetimes

https://datatracker.ietf.org/doc/html/rfc3339#section-5.6

* Add changelog entry

Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
  • Loading branch information
oittaa and hukkin committed Dec 13, 2021
1 parent c151139 commit a32fe82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tomli/_re.py
Expand Up @@ -34,9 +34,9 @@
fr"""
([0-9]{{4}})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]) # date, e.g. 1988-10-27
(?:
[T ]
[Tt ]
{_TIME_RE_STR}
(?:(Z)|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))? # optional time offset
(?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))? # optional time offset
)?
""",
flags=re.VERBOSE,
Expand Down

0 comments on commit a32fe82

Please sign in to comment.