Skip to content

Fix: Correct timestamp units in doc comments - #141

Open
bclarke123 wants to merge 1 commit into
EpicGames:mainfrom
bclarke123:time-resolution-fix
Open

Fix: Correct timestamp units in doc comments#141
bclarke123 wants to merge 1 commit into
EpicGames:mainfrom
bclarke123:time-resolution-fix

Conversation

@bclarke123

Copy link
Copy Markdown

What

Corrects documentation that describes timestamps as Unix epoch seconds when the values are actually milliseconds: the v1 proto comments (Repository.created, Branch.created, thin-client commit timestamp), the generated C header, and the revision history --date help. Doc-only, no wire or on-disk values change.

Why

The implementation is uniformly milliseconds end to end util::time::timestamp(), the persisted revision-metadata TIMESTAMP key, the server's cache-age math, the CLI's from_timestamp_millis displays - so external consumers that trust the documented unit get values 1000× larger than promised (we hit this building a web frontend against the API and had to add a runtime unit-sniffing workaround).

The --date flag is the one place this becomes a functional bug: passing epoch seconds as documented compares against millisecond values, so the filter silently never matches.

Notes

  • Audited all timestamp producers/consumers; the implementation never disagrees with itself - only the docs were wrong.
  • Fragment last_access genuinely is seconds (as_secs()) and is left as-is.
  • lore.h and prost output are regenerated, not hand-edited.

Signed-off-by: Ben Clarke <ben@arrayofstars.com>
@ajcarberry ajcarberry added area:client CLI area:core Core library and its interfaces (lib, C API); revision, storage, transport, protocol internals labels Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:client CLI area:core Core library and its interfaces (lib, C API); revision, storage, transport, protocol internals

Development

Successfully merging this pull request may close these issues.

2 participants