Skip to content

Commit

Permalink
AK: Events: Fix for events missing fully qualified time (openstates#4952
Browse files Browse the repository at this point in the history
)
  • Loading branch information
showerst authored May 17, 2024
1 parent 2d9e2e8 commit ad668c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scrapers/ak/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ def parse_event(self, row, chamber):
# No room name, so just use building address
location = building

# most dates are of the format 2023-05-15:T12:30:00-09:00
# but occasionally we just get 2023-05-15
start_date = dateutil.parser.parse(row.xpath("string(Schedule)"))
if "T" not in row.xpath("string(Schedule)"):
start_date = start_date.date()

# todo: do i need to self._TZ.localize() ?
event_name = f"{name}#{location}#{start_date}"
event = Event(
Expand Down

0 comments on commit ad668c4

Please sign in to comment.