feat: add configurable 12-hour and 24-hour time formats#812
Open
anonymoususer72041 wants to merge 7 commits into
Open
feat: add configurable 12-hour and 24-hour time formats#812anonymoususer72041 wants to merge 7 commits into
anonymoususer72041 wants to merge 7 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a configurable site-wide time format setting that allows OpenCATS installations to use either 12-hour or 24-hour time display.
This wires the existing
site.time_format_24setting into site localization, session handling, localization settings, the first-run wizard and the installer. It also applies the configured time format across activity display and editing, calendar forms and settings, email template date/time replacement and other user-facing date/time output where appropriate.The default behavior remains unchanged: existing installations continue to use the 12-hour format unless the 24-hour format is explicitly selected.
Motivation
This improves OpenCATS internationalization by allowing installations to use the time format that matches their locale and users' expectations.
A large share of countries commonly use the 24-hour time format. Supporting both 12-hour and 24-hour formats makes OpenCATS more suitable for international deployments while preserving the existing default behavior for users who prefer the 12-hour format.