Skip to content

[#24281] Normalized '%Z' formatting to UTC offset across platforms#151

Open
Danipiza wants to merge 3 commits intomainfrom
fix/filename-time
Open

[#24281] Normalized '%Z' formatting to UTC offset across platforms#151
Danipiza wants to merge 3 commits intomainfrom
fix/filename-time

Conversation

@Danipiza
Copy link
Copy Markdown
Contributor

Description

This PR makes timezone formatting deterministic in timestamp_to_string by replacing %Z with a computed UTC offset string (UTC+HH or UTC+HH:MM) before calling std::put_time.

Problem

%Z is platform-dependent:

  • Windows may return localized full timezone names
  • Linux commonly returns short abbreviations (e.g., CET)

This causes inconsistent outputs across OSes for the same formatting pattern.

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 21.62162% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.69%. Comparing base (355e332) to head (c29e243).

Files with missing lines Patch % Lines
cpp_utils/src/cpp/time/time_utils.cpp 21.62% 10 Missing and 19 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #151      +/-   ##
==========================================
- Coverage   60.41%   59.69%   -0.72%     
==========================================
  Files          65       65              
  Lines        1945     1980      +35     
  Branches      552      580      +28     
==========================================
+ Hits         1175     1182       +7     
- Misses        449      458       +9     
- Partials      321      340      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
@Danipiza Danipiza force-pushed the fix/filename-time branch from 59897d8 to c29e243 Compare March 31, 2026 13:12
@Danipiza Danipiza added the invalid This doesn't seem right label Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants