Closed alexander-beedie closed 1 year ago
Patch coverage: 100.00
% and project coverage change: -0.01
:warning:
Comparison is base (
1034825
) 83.93% compared to head (d89d9d6
) 83.92%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Follow-up to the previous PR, which was incomplete; this update now properly handles both fractional and non-fractional pre-epoch (negative) value conversions. Apologies for missing this first time round 😅
Added new tests to ensure that both cases are properly covered.
(Note that
div_floor
hasn't been standardised yet[^1], so this checks the remainder and applies the equivalent "-1" adjustment for fractional seconds in the negative timestamp case; default behaviour is round-to-zero, meaning we'd otherwise be off by one second).[^1]: Tracking Issue for int_roundings: https://github.com/rust-lang/rust/issues/88581