Skip to content

fix: return None for unsupported epoch timestamps - #1043

Closed
Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:fix/invalid-epoch-conversion
Closed

Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:fix/invalid-epoch-conversion

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

epoch_to_human_time promises None for invalid input, but timestamps outside the platform's supported range can raise OverflowError or OSError instead. Very large integers can also overflow during conversion to seconds. This can escape into callers such as test-record representation.

Handle those conversion failures alongside the existing ValueError case. Tests cover positive and negative out-of-range integers, overflow during division, platform conversion exceptions, valid formatting, and existing non-integer behavior.

Validation: six regression subcases fail before the fix; 86 utility/record tests and seven subtests pass afterward, with four platform skips. Pyink and git diff --check pass.

@xpconanfan

xpconanfan commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Closing this PR. We do not accept AI-generated PRs targeting synthetic edge cases.

@xpconanfan xpconanfan closed this Oct 1, 2026
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