fix: include timezone offset in all displayed timestamps (closes #116) #120
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/AutistMask#120
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/issue-116-timestamp-timezone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
All
isoDate()functions now output proper ISO 8601 format with timezone offset (e.g.2026-02-28T15:30:00-08:00) instead of bare datetime strings. Also usesTseparator per ISO 8601.closes #116
Changes
Fixed both
isoDate()functions (inhelpers.jsandaddressDetail.js) to include timezone offset in ISO 8601 format.Before:
2026-02-28 15:30:00After:
2026-02-28T15:30:00-08:00Also changed the date/time separator from space to
Tper ISO 8601.docker build .passes ✅✅ Review PASS
Changes reviewed: Two
isoDate()functions inaddressDetail.jsandhelpers.jsupdated to include timezone offset.Correctness: The timezone offset logic is correct — uses
-getTimezoneOffset()to get offset in minutes, formats as±HH:MM. TheTseparator is added per ISO 8601. Output example:2026-02-28T15:30:00-08:00.Scope: Only the two
isoDate()functions are modified. No linter config, test, or Makefile changes. No new dependencies.Build:
docker build .passes (lint, format check, build all green).Edge cases: Handles positive/negative offsets and zero offset (+00:00) correctly. Minutes component handled for half-hour timezones (e.g. India +05:30).
Labeling
merge-ready.add a "UTC Timestamps" toggle in Settings in the Display section, defaulted to off, that shows all timestamps everywhere in the app as UTC when enabled.
b755eb4899toa72359432bRework complete:
utcTimestampsin state, persisted across sessionsisoDate()functions (helpers.js, addressDetail.js, addressToken.js) to use UTC methods +Zsuffix when enabled, local time + timezone offset when disableddocker build .passes (tests + lint + build)Ready for review.
✅ Review PASS
Issue #116: Timestamps must always include timezone. ✅ Fixed.
Scope check:
isoDate()functions updated (helpers.js, addressDetail.js, addressToken.js) to append timezone offset (±HH:MM) in local modeutcTimestampsin state, uses UTC methods +Zsuffix when enabledutcTimestampsCorrectness: Timezone offset math is correct (
-getTimezoneOffset(), sign handling, padding). UTC path uses propergetUTC*methods. Half-hour timezone offsets handled. ISO 8601Tseparator added.Build:
docker build .passes (lint + fmt-check + tests + build).Note: The three identical
isoDate()functions are pre-existing duplication, not introduced by this PR. Could be consolidated in a future refactor.Branch is up to date with main. Labeling
merge-ready.