Skip to content

Commit

Permalink
Merge pull request #32 from pganssle/parser-twodigit-number-error
Browse files Browse the repository at this point in the history
Don't overwrite hours if they exist.
  • Loading branch information
pganssle committed Feb 9, 2015
2 parents 77987b3 + c7657ce commit 217753e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dateutil/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,8 @@ def _parse(self, timestr, dayfirst=None, yearfirst=None, fuzzy=False,
i += 1

if (len(ymd) == 3 and len_li in (2, 4)
and (i >= len_l or (l[i] != ':' and
info.hms(l[i]) is None))):
and res.hour is None and (i >= len_l or (l[i] != ':' and
info.hms(l[i]) is None))):
# 19990101T23[59]
s = l[i-1]
res.hour = int(s[:2])
Expand Down

0 comments on commit 217753e

Please sign in to comment.