Repository navigation
Fix GPS-to-UTC conversions immediately before leap-second insertions - #201
Open
heathsanchez wants to merge 3 commits into
Open
heathsanchez wants to merge 3 commits into
heathsanchez wants to merge 3 commits into
Conversation
Select leap-second offsets on the GPS-clock timeline while preserving the existing inserted-second mapping. Add historical, public API, and downstream export regressions. AI assistance: OpenAI Codex helped reconstruct and test this change.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1.1.1 #201 +/- ##
=========================================
Coverage ? 99.61%
=========================================
Files ? 27
Lines ? 3908
Branches ? 0
=========================================
Hits ? 3893
Misses ? 15
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the one-second GPS-to-UTC conversion error immediately before positive leap-second insertions. The existing
tow_to_datetime()selects a leap-second offset by comparing a GPS-clock timestamp against UTC transition dates, applying the new offset prematurely.This change:
get_leap_seconds()behavior, and existing dependencies.datetimecannot represent23:59:60, and this PR does not introduce that representation.Reproduction
Before the fix:
After the fix, the inverse returns
2016-12-31 23:59:59 UTC. Dependent public datetime and Unix-millisecond conversions also produce the expected values.Tests and evidence
prepare_kaggle_submission()regression checkingUnixTimeMillis. No claim is made that real competition data was affected.690 passed, 4 deselected, 2 dependency deprecation warnings. The four deselected tests require external FTP/HTTP; upstream CI remains to be verified.time_conversions.py.10.00/10for the modified production file. A Python-3.12-compatible lint comparison found no new errors or warnings in the touched files.git diff --checkpassed.This PR targets the current
v1.1.1release branch, following the contributing guide. There are no API changes, new dependencies, or directory changes.Fixes #192
AI assistance: OpenAI Codex helped reconstruct and independently test the change.