summaryrefslogtreecommitdiff
path: root/dateutil/parser/_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'dateutil/parser/_parser.py')
-rw-r--r--dateutil/parser/_parser.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/dateutil/parser/_parser.py b/dateutil/parser/_parser.py
index 1391437..a5ec2fb 100644
--- a/dateutil/parser/_parser.py
+++ b/dateutil/parser/_parser.py
@@ -613,6 +613,14 @@ class parser(object):
if not ignoretz:
ret = self._build_tzaware(ret, res, tzinfos)
+ elif not res.tzname and not res.tzoffset:
+ # i.e. no timezone information was found.
+ pass
+ else:
+ # tz-like string was parsed but we don't know what to do
+ # with it
+ raise ValueError(res.tzname)
+
if kwargs.get('fuzzy_with_tokens', False):
return ret, skipped_tokens
else: