diff --git a/django/utils/dateparse.py b/django/utils/dateparse.py
index 032eb49..3e28eb3 100644
a
|
b
|
datetime_re = re.compile(
|
19 | 19 | r'(?P<year>\d{4})-(?P<month>\d{1,2})-(?P<day>\d{1,2})' |
20 | 20 | r'[T ](?P<hour>\d{1,2}):(?P<minute>\d{1,2})' |
21 | 21 | r'(?::(?P<second>\d{1,2})(?:\.(?P<microsecond>\d{1,6})\d{0,6})?)?' |
22 | | r'(?P<tzinfo>Z|[+-]\d{1,2}:\d{1,2})?$' |
| 22 | r'(?P<tzinfo>Z|[+-]\d{1,2}:?\d{1,2})?$' |
23 | 23 | ) |
24 | 24 | |
25 | 25 | time_re = re.compile( |
… |
… |
def parse_datetime(value):
|
77 | 77 | if tzinfo == 'Z': |
78 | 78 | tzinfo = utc |
79 | 79 | elif tzinfo is not None: |
80 | | offset = 60 * int(tzinfo[1:3]) + int(tzinfo[4:6]) |
| 80 | tzinfo = re.sub(':','',tzinfo) |
| 81 | offset = 60 * int(tzinfo[1:3]) + int(tzinfo[3:5]) |
81 | 82 | if tzinfo[0] == '-': |
82 | 83 | offset = -offset |
83 | 84 | tzinfo = FixedOffset(offset) |