fix(capture): document UTC timestamp normalization - #45
Merged
dustinbyrne merged 1 commit intoAug 20, 2026
Conversation
Nine SDKs independently fixed the same bug this week: caller-supplied timestamps were serialized in their original timezone/offset instead of being normalized to UTC, and fractional seconds were sometimes truncated. The spec only said "ISO 8601 with timezone," which doesn't capture that the timezone is always UTC. Generated-By: PostHog Desktop Task-Id: 3ddf61c1-e6f7-46b2-b8d4-06a71a62848f
dustinbyrne
approved these changes
Aug 20, 2026
dustinbyrne
marked this pull request as ready for review
August 20, 2026 20:31
dustinbyrne
deleted the
posthog/fix-capture-timestamp-utc-normalization
branch
August 20, 2026 20:31
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
capturespec's "Attach envelope fields" step:timestampis normalized to its equivalent UTC instant before serialization (not left in the caller's original timezone/offset), and sub-second precision is preserved when present on the input.Why
Nine SDKs merged the same fix within a day of each other (2026-08-13/14): caller-supplied
timestampoverrides (and posthog-php's parsed default) were serialized with their original UTC offset intact instead of being converted to UTC, and fractional seconds were sometimes truncated to whole seconds.Source PRs:
The spec previously said timestamps are serialized "in ISO 8601 with timezone" — true but incomplete, since it didn't say the timezone is always UTC. A new SDK implemented from this spec alone would have shipped the exact bug these nine PRs just fixed.
Prose-only change (no requirement/scenario text touched — none assert a specific timezone), archived directly per this repo's convention for prose fixes (see
2026-08-13-fix-node-shutdown-timeout-resolvesfor precedent).Uncertain / follow-up
tasks.mdas a follow-up, not asserted either way.openspec validate --specs --strictcould not be run locally (CLI unavailable in this sandbox); please confirm CI passes.Created with PostHog Desktop