summaryrefslogtreecommitdiff
path: root/django/utils/dateparse.py
diff options
context:
space:
mode:
authorBen Wilber <benwilber@gmail.com>2021-05-07 20:59:17 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-06-24 10:07:55 +0200
commitfff4870bfa7ed4d9ab6be0060364b23c66ad1af0 (patch)
tree70f99726f6b99f262370af3dadddcdbbc37e1d78 /django/utils/dateparse.py
parentfcb75651f9b8c2f76ec037f1a68a0e5c99263d8c (diff)
Fixed #32727 -- Allowed spaces before time zone offset in parse_datetime().
Diffstat (limited to 'django/utils/dateparse.py')
-rw-r--r--django/utils/dateparse.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/dateparse.py b/django/utils/dateparse.py
index e069f5df39..47791b9331 100644
--- a/django/utils/dateparse.py
+++ b/django/utils/dateparse.py
@@ -23,7 +23,7 @@ datetime_re = _lazy_re_compile(
r'(?P<year>\d{4})-(?P<month>\d{1,2})-(?P<day>\d{1,2})'
r'[T ](?P<hour>\d{1,2}):(?P<minute>\d{1,2})'
r'(?::(?P<second>\d{1,2})(?:[\.,](?P<microsecond>\d{1,6})\d{0,6})?)?'
- r'(?P<tzinfo>Z|[+-]\d{2}(?::?\d{2})?)?$'
+ r'\s*(?P<tzinfo>Z|[+-]\d{2}(?::?\d{2})?)?$'
)
standard_duration_re = _lazy_re_compile(