Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msglist: Follow user settings for message timestamps #1398

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Gaurav-Kushwaha-1225
Copy link
Contributor

Fixes: #1015

Summary

The message timestamps now uses user's twentyFourHourTime settings.

Previously, timestamps were always formatted in 12-hour format (h:mm aa), irrespective of the user's preference.

With this fix, timestamps now correctly switch between:

  • 24-hour format: HH:mm
  • 12-hour format: h:mm aa

Changes Made

  • Retrieved the user's twentyFourHourTime setting from userSettings.
  • Applied the appropriate time format based on the user's preference.

Screenshots

12-Hour Format 24-Hour Format
12-Hour 24-Hour

Earlier, timestamps were always formatted as 12-hour (h:mm aa),
ignoring the user's preference `twentyFourHourTime` in settings.

Now, the code retrieves the user's setting and selects the appropriate
format:
• 24-hour format: "HH:mm"
• 12-hour format: "h:mm aa"
@gnprice gnprice added this to the M6: Post-launch milestone Mar 12, 2025
@gnprice
Copy link
Member

gnprice commented Mar 12, 2025

Thanks for picking this up.

This is a post-launch issue, so we won't be able to spend time reviewing this PR in the next month or two before the app launches. Compare #1152 (comment) .

If you'd like to contribute to Zulip, the best thing to work on next would be revising your existing open PR to respond to the review feedback there. In general that's the top priority among Zulip work.

@gnprice gnprice marked this pull request as draft March 12, 2025 05:59
@Gaurav-Kushwaha-1225
Copy link
Contributor Author

Thanks for the update! 🙂

I understand the current priorities and I'll revisit this issue later when post launch begins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui: Follow user_settings.twenty_four_hour_time
2 participants