Times outside Timestamp ignore the Appearance time zone #1761

Closed
opened 2026-11-02 04:14:40 +00:00 by sam · 1 comment
Owner

These format times by hand and ignore the time zone chosen under Appearance, which Timestamp honours (ui/src/components/ui/timestamp/Timestamp.vue:19):

  • ui/src/base/LogTable.vue:60 via shortTime() (ui/src/lib/log.ts:65-68)
  • ui/src/audit/audit.ts:297-300 (localTime, the From/To chips)
  • ui/src/chat/session.ts:3-16 (conversation titles)

Durations also use three formats ("40.6 s", "1.2s", "1.2 min", "1m 4s", "12ms" vs "12 ms"): ui/src/tasks/timeline-event.ts:18-33, ui/src/chat/ChatToolCall.vue:125-129, ui/src/schedules/schedule.ts:123-127, ui/src/workflows/labels.ts:30-33, ui/src/workflows/StepNode.vue:77.

Done when: times go through Timestamp or the appearance zone, and one duration formatter is used everywhere.

These format times by hand and ignore the time zone chosen under Appearance, which `Timestamp` honours (`ui/src/components/ui/timestamp/Timestamp.vue:19`): - `ui/src/base/LogTable.vue:60` via `shortTime()` (`ui/src/lib/log.ts:65-68`) - `ui/src/audit/audit.ts:297-300` (`localTime`, the From/To chips) - `ui/src/chat/session.ts:3-16` (conversation titles) Durations also use three formats ("40.6 s", "1.2s", "1.2 min", "1m 4s", "12ms" vs "12 ms"): `ui/src/tasks/timeline-event.ts:18-33`, `ui/src/chat/ChatToolCall.vue:125-129`, `ui/src/schedules/schedule.ts:123-127`, `ui/src/workflows/labels.ts:30-33`, `ui/src/workflows/StepNode.vue:77`. Done when: times go through Timestamp or the appearance zone, and one duration formatter is used everywhere.
sam added the mediumbug labels 2026-11-02 04:14:40 +00:00
sam self-assigned this 2026-11-02 04:14:40 +00:00
Author
Owner

Fixed in 0dc5bf9a. lib/format.ts now owns the single duration() formatter (moved from timeline-event.ts, which re-exports it — duration.test.ts unchanged and passing) and a zone-aware shortTime(). LogTable's time column, audit's From/To chips (exactTime in the Appearance zone) and chat session titles (cached Intl formatter per zone) no longer use the browser zone. StepNode, schedule runDuration, labels formatMs and ChatToolCall all delegate to duration(), so "12ms"/"12 ms"/"under 1 s" collapse to one format. Note: the .ts modules use relative imports with .ts extensions because the node test runner can't resolve the @/ alias — first gate run caught that, fixed. Verified: task check passed (103/103 ui tests) on the committed tree.

Fixed in 0dc5bf9a. lib/format.ts now owns the single duration() formatter (moved from timeline-event.ts, which re-exports it — duration.test.ts unchanged and passing) and a zone-aware shortTime(). LogTable's time column, audit's From/To chips (exactTime in the Appearance zone) and chat session titles (cached Intl formatter per zone) no longer use the browser zone. StepNode, schedule runDuration, labels formatMs and ChatToolCall all delegate to duration(), so "12ms"/"12 ms"/"under 1 s" collapse to one format. Note: the .ts modules use relative imports with .ts extensions because the node test runner can't resolve the @/ alias — first gate run caught that, fixed. Verified: task check passed (103/103 ui tests) on the committed tree.
sam closed this issue 2026-11-06 11:34:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1761