Skip to content

Commit

Permalink
allow floats as datetime input
Browse files Browse the repository at this point in the history
  • Loading branch information
purarue committed Apr 25, 2024
1 parent a9c3d74 commit c534bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion active_window/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def parse_window_events(


def _parse_datetime_sec(d: Union[str, float, int]) -> datetime:
return datetime.fromtimestamp(int(d), tz=timezone.utc)
return datetime.fromtimestamp(int(float(d)), tz=timezone.utc)


def _parse_csv_events(
Expand Down

0 comments on commit c534bbb

Please sign in to comment.