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

Wrong Stats #19

Open
wann-ist-abgabe opened this issue Dec 3, 2024 · 0 comments
Open

Wrong Stats #19

wann-ist-abgabe opened this issue Dec 3, 2024 · 0 comments

Comments

@wann-ist-abgabe
Copy link

wann-ist-abgabe commented Dec 3, 2024

Hello,

the part-1 times shown with *stats seem to be incorrect, 4 minutes to small.
The problem probably originates from the Problem.parse_dict function, in which 240 second (4 minutes) are subtracted from the timestamps returned from the AoC-API. The reason for that, namely AoC returning timestamps 4 minutes ahead, seems to be no longer the case.

def parse_dict(self, problem: Optional[dict]):
self.start_time = datetime(year=YEAR, month=12, day=self.day, hour=0, tzinfo=EST)
if problem:
#NOTE: THE MINUS 240 part is because for unknown reasons the Advent of Code API returns dates 4 minutes ahead
self.part1_finish_time = datetime.fromtimestamp(problem['1']['get_star_ts'] - 240, tz=UTC)
self.parts_finished = 1
if '2' in problem:
#NOTE: THE MINUS 240 part is because for unknown reasons the Advent of Code API returns dates 4 minutes ahead
self.part2_finish_time = datetime.fromtimestamp(problem['2']['get_star_ts'] - 240, tz=UTC)
self.parts_finished = 2

@wann-ist-abgabe wann-ist-abgabe changed the title Wrong Timestamp Wrong Stats Dec 3, 2024
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

No branches or pull requests

1 participant