Skip to content

date: fix -s UTC conversion losing timezone offset#10828

Open
yachi wants to merge 1 commit intouutils:mainfrom
yachi:fix-date-set-utc-conversion
Open

date: fix -s UTC conversion losing timezone offset#10828
yachi wants to merge 1 commit intouutils:mainfrom
yachi:fix-date-set-utc-conversion

Conversation

@yachi
Copy link

@yachi yachi commented Feb 8, 2026

Fixes #10800

-s with a timezone offset used datetime().to_zoned(UTC) which strips the offset and reinterprets wall-clock time as UTC. Changed to timestamp().to_zoned(UTC) to preserve the absolute instant.

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

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.

date: -u -s "10:30 EST" sets wrong time

1 participant