146 support different timedate format#178
Merged
AlixANNERAUD merged 4 commits intomainfrom Mar 25, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…c for handling negative timestamps
…se_unix_timestamp
a2569e7 to
15e04cf
Compare
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.
This pull request introduces a new internationalized time formatting utility, refactors time decomposition logic for clarity and correctness (especially for negative Unix timestamps), and updates code to use these new utilities. The changes improve maintainability, correctness, and enable locale-independent time formatting throughout the codebase.
Internationalization and Time Formatting
format_unix_timestampfunction inmodules/internationalization/src/time.rsthat formats Unix timestamps using Python-likestrftimetokens, supporting common date/time patterns and locale-independent AM/PM formatting. Includes tests. (modules/internationalization/src/time.rs,modules/internationalization/Cargo.toml, [1] [2]executables/shell/graphical/src/layout.rswith the newinternationalization::format_unix_timestamputility. (executables/shell/graphical/src/layout.rs, [1] [2]Time Decomposition Refactor
unix_to_human_timeis nowdecompose_unix_timestamp, with more robust handling of negative timestamps (dates before 1970). Added comprehensive tests for edge cases and leap years. (modules/shared/src/time.rs, [1] [2] [3]decompose_unix_timestampname, including in file system time display logic. (modules/file_system/src/time.rs, [1] [2]Minor Dependency and Module Updates
sharedcrate as a dependency for theinternationalizationmodule to allow reuse of time decomposition logic. (modules/internationalization/Cargo.toml, modules/internationalization/Cargo.tomlR8)embassy-syncin thesynchronizationmodule for consistency across platforms. (modules/synchronization/Cargo.toml, modules/synchronization/Cargo.tomlR6-L11)internationalizationmodule for external use. (modules/internationalization/src/lib.rs, modules/internationalization/src/lib.rsR9-R12)