Skip to content

Wrong Stats #19

@stan-waibbange

Description

@stan-waibbange

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions