Skip to content

fix: TZ prefix should override base date timezone#255

Merged
sylvestre merged 2 commits intouutils:mainfrom
ChrisDryden:fix-tz-prefix-with-base-date
Feb 12, 2026
Merged

fix: TZ prefix should override base date timezone#255
sylvestre merged 2 commits intouutils:mainfrom
ChrisDryden:fix-tz-prefix-with-base-date

Conversation

@ChrisDryden
Copy link
Contributor

This PR addresses the failing date GNU test cross-TZ-mishandled where the TZ environment variable is not being used in when building the Zoned object. The fix is simply to check if the TZ is provided and set the timestamp to_zoned with that timezone.

This added no regressions to the main date integ test suite or in the date GNU tests

// while keeping the base's timestamp for relative date calculations.
let base = match (self.base, &self.timezone) {
(Some(b), _) => b,
(Some(b), Some(tz)) => b.timestamp().to_zoned(tz.clone()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure the clone are necessary here ?
(if you use self.timezone instead in the match)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping ? :)

@sylvestre sylvestre merged commit 642bbbf into uutils:main Feb 12, 2026
17 checks passed
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (3a1edfb) to head (1cafd1f).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #255   +/-   ##
===========================
===========================

☔ 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.

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.

2 participants

Comments