fix(date): force UTC formatting under virtual clock modes#1637
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 4f18b49 | Commit Preview URL | May 19 2026, 09:12 AM |
Remove extra blank line introduced before the new TM-INF-018 test function so `cargo fmt --check` passes in CI.
e703c0e to
4f18b49
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.
Motivation
fixed_epoch/epoch_offset) were intended to blind absolute wall-clock information for TM-INF-018, but final formatting still used the hostLocaltimezone when-uwas not supplied, permitting timezone fingerprinting.Description
virtualized_clockflag and aforce_utcvalue inDate::executethat is true when-u, epoch input, or a virtual clock mode is active.force_utcparameter and use it to avoid converting the virtual UTC timestamp throughchrono::Local.force_utcfor the-R,-I*, and+FORMAT(default/custom) output paths so timezone-bearing formats (%z,%Z,-R,-Iseconds) emit UTC when the clock is virtualized.tests/threat_model_tests.rsthat assertfixed_epochreturns+0000fordate +%zandepoch_offsetends RFC 2822 output with+0000.Testing
cargo test --test threat_model_tests tm_inf_018_date, which executed the relevant tests and reported all tests passed (6 passed).Codex Task