diff options
Diffstat (limited to 'dateutil/parser/_parser.py')
-rw-r--r-- | dateutil/parser/_parser.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dateutil/parser/_parser.py b/dateutil/parser/_parser.py index 1cb592d..efb76fa 100644 --- a/dateutil/parser/_parser.py +++ b/dateutil/parser/_parser.py @@ -388,7 +388,8 @@ class parserinfo(object): if res.year is not None: res.year = self.convertyear(res.year, res.century_specified) - if res.tzoffset == 0 and not res.tzname or res.tzname == 'Z': + if (res.tzoffset == 0 and not res.tzname or res.tzname == 'Z' + or res.tzname == 'z'): res.tzname = "UTC" res.tzoffset = 0 elif res.tzoffset != 0 and res.tzname and self.utczone(res.tzname): @@ -1060,7 +1061,8 @@ class parser(object): tzname is None and tzoffset is None and len(token) <= 5 and - all(x in string.ascii_uppercase for x in token)) + (all(x in string.ascii_uppercase for x in token) + or token in self.info.UTCZONE)) def _ampm_valid(self, hour, ampm, fuzzy): """ |