Skip to content

fix(tui): switch formatTimeWithSeconds to local time + add negative input guard#720

Merged
JeremyDev87 merged 1 commit intomasterfrom
fix/time-functions-utc-negative-700
Mar 20, 2026
Merged

fix(tui): switch formatTimeWithSeconds to local time + add negative input guard#720
JeremyDev87 merged 1 commit intomasterfrom
fix/time-functions-utc-negative-700

Conversation

@JeremyDev87
Copy link
Owner

Summary

  • Switch formatTimeWithSeconds from getUTC* to get* (local time) — users expect local clock in HeaderBar
  • Add Math.max(0, ...) guard in formatElapsed and formatRelativeTime to handle clock drift (negative input)
  • Update all time-related tests to use local time constructors + add clock drift edge case tests

Test plan

  • New tests: clock drift → "0s" / "just now" clamping
  • Updated tests: formatTimeWithSeconds + HeaderBar local time verification
  • All 4812 existing tests pass (0 regressions)
  • Full CI: lint, format, typecheck, test:coverage, circular, build — all pass

Closes #700

…nput guard

- Replace getUTC* with get* in formatTimeWithSeconds for local time display
- Add Math.max(0, ...) guard in formatElapsed and formatRelativeTime
- Update tests to use local time constructors and add clock drift edge cases

Closes #700
@JeremyDev87 JeremyDev87 added the bug Something isn't working label Mar 19, 2026
@vercel
Copy link

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Mar 19, 2026 9:52am

@JeremyDev87 JeremyDev87 self-assigned this Mar 20, 2026
@JeremyDev87 JeremyDev87 merged commit 76d2894 into master Mar 20, 2026
25 checks passed
@JeremyDev87 JeremyDev87 deleted the fix/time-functions-utc-negative-700 branch March 20, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(tui): formatTimeWithSeconds UTC/local ambiguity + formatElapsed negative input

1 participant