Skip to content

Commit

Permalink
Fixed bug with current state of master
Browse files Browse the repository at this point in the history
  • Loading branch information
ennamarie19 committed Dec 21, 2023
1 parent 325ae9d commit 6223f83
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions dateparser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,16 +567,6 @@ def _correct_for_time_frame(self, dateobj, tz):
except (pytz.UnknownTimeZoneError, pytz.NonExistentTimeError):
tz_offset = timedelta(hours=0)

dateobj_time = None
if tz:
try:
dateobj_time = (dateobj - tz.utcoffset(dateobj)).time()
except pytz.InvalidTimeError:
pass

if not dateobj_time:
dateobj_time = dateobj.time()

if "past" in self.settings.PREFER_DATES_FROM:
if self.now < dateobj - tz_offset:
dateobj = dateobj + timedelta(days=-1)
Expand Down

0 comments on commit 6223f83

Please sign in to comment.