Skip to content

Commit

Permalink
Trying to use new localized
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmatte committed Dec 22, 2023
1 parent ba01b24 commit 474db94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def output_dir_path(route_id: str, direction_id: str, stop_id: str, ts: datetime
def service_date(ts: datetime) -> date:
localized = ts.astimezone(EASTERN_TIME)
if localized.hour >= 3 and localized.hour <= 23:
return date(ts.year, ts.month, ts.day)
return date(localized.year, localized.month, localized.day)

prior = localized - timedelta(days=1)
return date(prior.year, prior.month, prior.day)
Expand Down

0 comments on commit 474db94

Please sign in to comment.