[bug]Keep auth status dates stable across timezones#1407
Merged
Soph merged 2 commits intoJun 15, 2026
Conversation
The auth status session table displays date-only values from server RFC3339 timestamps. Converting those instants through the local timezone before dropping the time made midnight UTC sessions appear one day early for users west of UTC. Constraint: Auth session timestamps are server-provided RFC3339 values and the table renders only YYYY-MM-DD, not a full local datetime. Rejected: Keep Local() and expand the table to include local time | broader UX change than needed for this display-only bug. Confidence: high Scope-risk: narrow Directive: Do not reintroduce Local() here unless the UI also shows time and timezone context. Tested: TZ=America/Los_Angeles go test ./cmd/entire/cli -run 'TestRunAuthStatus_RendersSessionsTable|TestFormatAuthDate_DoesNotShiftUTCDateToLocalTimezone' -count=1 -v; go test ./cmd/entire/cli -count=1; mise run check Not-tested: Manual auth status against a live core Entire-Checkpoint: c93f3cd1bb07
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.
Entire logs: https://entire.io/gh/stale2000/cli/session/019eb399-2d0c-7a52-bd77-ee57e66eb3fe#timeline-c93f3cd1bb07
Summary
entire auth statusrendered active-session dates after converting server RFC3339 timestamps into the user's local timezone. That is correct for a full local datetime, but this UI only shows a date, so users west of UTC could see session dates shifted one day earlier than the server-provided date.Example
Server session timestamp:
The old formatter parsed that timestamp, called
Local(), then rendered onlyYYYY-MM-DD.For a user in
America/Los_Angeles, the same instant becomes:Because the table hides the time and timezone, the user only saw:
That made the
CREATED,LAST USED, andEXPIREScolumns appear one day early even though the server timestamp was correct.Fix
Format the parsed RFC3339 timestamp in its encoded timezone instead of converting it through
Local()first. For server UTC timestamps, this preserves the server calendar date:This keeps the date-only auth status table stable across user timezones. If we later want true local-time semantics, the UI should show a full local datetime including time and timezone context.
Tests
time.Localto PST and verifies2026-01-01T00:00:00Zstill renders as2026-01-01.TZ=America/Los_Angeles.