Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GameScoreboard.date #78

Merged
merged 4 commits into from
Apr 1, 2018
Merged

Fix GameScoreboard.date #78

merged 4 commits into from
Apr 1, 2018

Conversation

dowski
Copy link
Contributor

@dowski dowski commented Mar 29, 2018

I think this is right, although I wonder if the timezone that that game_start_time is returned in varies based on where you are requesting the data from (using IP geolocation or something?).

I also updated the test based on the 7:11PM first pitch time reported in the game box score.

It was incorrectly offsetting the time when the `game_start_time` was PM. It now parses the time using the `datetime` module's `datetime.strptime` classmethod.
This makes it consistent with my recent GameScoreboard.date change.
@dowski dowski changed the title Fix for #77 Fix GameScoreboard.date Mar 29, 2018
@dowski
Copy link
Contributor Author

dowski commented Mar 29, 2018

This is targeted to fix #77.

This change normalizes a timestamp like "12:40 pm" to "12:40pm". That will ensure it matches the format string when converting to a datetime.
@dowski
Copy link
Contributor Author

dowski commented Mar 30, 2018

Not sure why coverage fell. The lines I changed are covered.

@panzarino
Copy link
Owner

@dowski What does this change do? Why did you have to change the date in the tests? This could cause issues for people if the date has to be changed.

@panzarino
Copy link
Owner

Disregard previous comment as I saw #77.

@panzarino panzarino merged commit a2e55c5 into panzarino:master Apr 1, 2018
@dowski dowski deleted the patch-1 branch April 3, 2018 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants