summaryrefslogtreecommitdiff
path: root/dateutil/parser
diff options
context:
space:
mode:
authorCheuk Ho <cheuk@Cheuks-MacBook-Pro.local>2018-10-02 14:47:38 +0100
committerPaul Ganssle <paul@ganssle.io>2018-10-06 13:39:50 -0400
commit91ba90e61941ddbcd16dbe8ef8441d0b8e51a084 (patch)
tree6cc1ebb98b774ce0217728fdecc42c3be4e60bcf /dateutil/parser
parent479e340ce9f32581aa6eeb54e97c4e7866d31611 (diff)
downloaddateutil-git-91ba90e61941ddbcd16dbe8ef8441d0b8e51a084.tar.gz
Accept 'z' for 'Z' in isoparse
Diffstat (limited to 'dateutil/parser')
-rw-r--r--dateutil/parser/_parser.py2
-rw-r--r--dateutil/parser/isoparser.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/dateutil/parser/_parser.py b/dateutil/parser/_parser.py
index 044466d..1cb592d 100644
--- a/dateutil/parser/_parser.py
+++ b/dateutil/parser/_parser.py
@@ -291,7 +291,7 @@ class parserinfo(object):
("s", "second", "seconds")]
AMPM = [("am", "a"),
("pm", "p")]
- UTCZONE = ["UTC", "GMT", "Z"]
+ UTCZONE = ["UTC", "GMT", "Z", "z"]
PERTAIN = ["of"]
TZOFFSET = {}
# TODO: ERA = ["AD", "BC", "CE", "BCE", "Stardate",
diff --git a/dateutil/parser/isoparser.py b/dateutil/parser/isoparser.py
index 172972b..e3cf6d8 100644
--- a/dateutil/parser/isoparser.py
+++ b/dateutil/parser/isoparser.py
@@ -341,7 +341,7 @@ class isoparser(object):
while pos < len_str and comp < 5:
comp += 1
- if timestr[pos:pos + 1] in b'-+Z':
+ if timestr[pos:pos + 1] in b'-+Zz':
# Detect time zone boundary
components[-1] = self._parse_tzstr(timestr[pos:])
pos = len_str
@@ -376,7 +376,7 @@ class isoparser(object):
return components
def _parse_tzstr(self, tzstr, zero_as_utc=True):
- if tzstr == b'Z':
+ if tzstr == b'Z' or tzstr == b'z':
return tz.tzutc()
if len(tzstr) not in {3, 5, 6}: