diff options
author | Paul Ganssle <paul@ganssle.io> | 2018-10-06 11:10:38 -0400 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2018-10-06 13:39:50 -0400 |
commit | d638cc773b33d08b0c1e7a875f0cb527ea32c4c4 (patch) | |
tree | 458411a3e1b93b672bf5e8dbf665671cc358bee4 | |
parent | 969d6bac84ca34276155d85c4943c3c736781187 (diff) | |
download | dateutil-d638cc773b33d08b0c1e7a875f0cb527ea32c4c4.tar.gz |
Regroup if statements in tzname logic
This makes the grouping of the logic clearer; UTC is used either in the
first group or the second group.
-rw-r--r-- | dateutil/parser/_parser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dateutil/parser/_parser.py b/dateutil/parser/_parser.py index efb76fa..0da0f3e 100644 --- a/dateutil/parser/_parser.py +++ b/dateutil/parser/_parser.py @@ -388,8 +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' - 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): |