Skip to content

feat: Allow Overriding Timestamp Format in Settings#855

Merged
juliusmarminge merged 7 commits intopingdotgg:mainfrom
huxcrux:24-hour-timestamp
Mar 12, 2026
Merged

feat: Allow Overriding Timestamp Format in Settings#855
juliusmarminge merged 7 commits intopingdotgg:mainfrom
huxcrux:24-hour-timestamp

Conversation

@huxcrux
Copy link
Contributor

@huxcrux huxcrux commented Mar 10, 2026

What Changed

Adds a 24-hour timestamp setting and applies it across chat, diffs, and plan timestamps. It also centralizes timestamp formatting and makes the setting persist safely across reloads.

Why

Timestamps were previously fixed to 12-hour format. Many users, especially outside the US, expect 24-hour time by default or strongly prefer it. This adds a simple preference and applies it consistently across the app without duplicating formatting logic.

UI Changes

Before: screenshot showing 12-hour timestamps in the chat UI
image

After: screenshot showing 24-hour timestamps in the same UI
image

Settings: screenshot showing the new Use 24-hour timestamps toggle in Settings
image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add 24-hour, 12-hour, and locale timestamp format options to app settings

  • Adds a new timestampFormat setting ('locale' | '12-hour' | '24-hour') to appSettings.ts, defaulting to 'locale'.
  • Introduces timestampFormat.ts with formatTimestamp and formatShortTimestamp utilities that build cached Intl.DateTimeFormat instances per format and seconds-inclusion.
  • Threads timestampFormat from ChatView down to MessagesTimeline and PlanSidebar, and applies it in DiffPanel, replacing the previously scattered local formatting logic.
  • Exposes a 'Timestamp format' selector with a 'Restore default' button in the Settings UI at _chat.settings.tsx.
  • Behavioral Change: formatTimestamp is removed from session-logic.ts; all callers must now use the new module.

Macroscope summarized f17bf3f.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e2290e3b-006b-4384-8c15-4d777085912b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 10, 2026
@huxcrux huxcrux changed the title Add 24-hour timestamp support feat: Add 24-hour timestamp support Mar 10, 2026
@huxcrux huxcrux force-pushed the 24-hour-timestamp branch from 713c11a to e02b780 Compare March 12, 2026 19:08
@github-actions github-actions bot added the size:L 100-499 changed lines (additions + deletions). label Mar 12, 2026
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like rebase went wrong here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you caught me in the middle of a cleanup, it should look beter now :)

@juliusmarminge
Copy link
Member

kinda feels like this is appearance related so could go in the same card?

CleanShot 2026-03-12 at 12 37 38@2x

@huxcrux
Copy link
Contributor Author

huxcrux commented Mar 12, 2026

kinda feels like this is appearance related so could go in the same card?

CleanShot 2026-03-12 at 12 37 38@2x

That fair, let me push a fix

@huxcrux
Copy link
Contributor Author

huxcrux commented Mar 12, 2026

Settings after moving timestamp into appearance:
image

@juliusmarminge
Copy link
Member

as a form of future proofing i'd probably go for a string based format selector. boolean flags are kinda shit and tends to not scale 😆

@huxcrux huxcrux force-pushed the 24-hour-timestamp branch from 4383fc7 to 0eb7e8f Compare March 12, 2026 20:02
@huxcrux
Copy link
Contributor Author

huxcrux commented Mar 12, 2026

as a form of future proofing i'd probably go for a string based format selector. boolean flags are kinda shit and tends to not scale 😆

Changed the setting to be string based with a dropdown, new look:
image

@huxcrux
Copy link
Contributor Author

huxcrux commented Mar 12, 2026

I made it even better by defaulting to locale (System default) and allowing you to override it.
image
image

@huxcrux huxcrux changed the title feat: Add 24-hour timestamp support feat: Allow Overriding Timestamp Format in Settings Mar 12, 2026
@juliusmarminge juliusmarminge merged commit 727c0cf into pingdotgg:main Mar 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants