Derive a UTC instant from the offset the PAS log records - #194
Merged
Merged
Conversation
Timestamp stays the head unit's reading as recorded. Two columns are added beside it: Timestamp UTC, typed as an instant, and UTC Offset Applied. The offset is not assumed. The clock subsystem records it in two forms, a published UTC time and a stated total_offset, both carrying a validity flag, and only lines flagged valid are used. Each reading takes the nearest such line within 10 minutes and is left blank when there is none, so nothing is extrapolated across a gap. That matters because the offset belongs to the moment: on a Sync Gen3 extraction it was 4 hours in most periods, 5 in one and 6 in another, with the head unit reporting its clock already correct. The boot-time GPS comparison is deliberately not used as a reference. On the boots where it reports a correction, the reading it carries is the clock as it was before being corrected, so it measures the fault rather than the zone. The published value carries second: [0] on every line and is not written at the same instant as the line holding it, so the raw difference lands within a minute of the offset rather than on it. Civil UTC offsets are whole multiples of 15 minutes, so the derived value is snapped to that. On the committed case this agrees with the total_offset the head unit states outright. All 24,581 readings in that case derive, every one at -04:00, and the derived instants agree with all 409 published UTC lines the log carries. Row counts are unchanged. LAVA now stores a real epoch for the derived column and keeps the recorded reading as text beside it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Adds a derived UTC instant beside the PAS log reading.
Timestampstays the head unit's reading as recorded.Timestamp UTCandUTC Offset Appliedare new.All 24,581 readings in the committed case derive, every one at -04:00, and agree with all 409 published UTC lines in the log. Row counts unchanged.
🤖 Generated with Claude Code