Skip to content

Commit

Permalink
Convert reported game start date/time to EDT when deciding if a game …
Browse files Browse the repository at this point in the history
…is complete
  • Loading branch information
dgmdan committed Apr 22, 2017
1 parent 7bae8a2 commit 7153b73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/espn_scraper/scores.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def home_away_parse(doc, date=nil)

# Game must not be suspended if it was supposed to start on the query date.
# This prevents fetching scores for suspended games which are not yet completed.
game_start_date = Date.parse(game['date'])
next if date && game['competitions'][0]['wasSuspended'] && game_start_date == date
game_start = DateTime.parse(game['date']).to_time.utc + Time.zone_offset('EDT')
next if date && game['competitions'][0]['wasSuspended'] && game_start.to_date == date

score = {}
competition = game['competitions'].first
Expand Down

0 comments on commit 7153b73

Please sign in to comment.