You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
touch: read -d dates in the local zone and honor their offsets - #15292
touch -d read a date without an offset, such as 2026-08-01 12:00:00, as UTC. It now reads it in the system zone, as the documentation describes.
This also changes dates that have an offset. The offset used to be dropped, so 2004-01-16 12:00 +0200 was set to 12:00 UTC. It now honors the offset and sets 10:00 UTC. test_touch_set_date7 has its expected value updated to match.
Integration tests set TZ to a non-UTC zone and check fixed timestamps for both forms. Run locally on Windows only. Six symlink tests fail there for a privilege reason, unrelated to this change.
touch -d read "YYYY-MM-DD HH:MM:SS" as UTC. GNU touch reads it as local
time. Use the system zone for the formats that carry no offset. Adds a
unit test that fails on the UTC behaviour.
The unit tests compared against the system zone, which is UTC on UTC CI
hosts, so they passed without the local-zone behavior. Move the coverage
to integration tests that set TZ to a non-UTC zone and check fixed epochs.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
jay23606
changed the title
touch: read a date without an offset in the local zone
touch: read -d dates in the local zone and honor their offsets
Oct 13, 2026
parse_datetime normalizes a wall-clock time the zone skipped, so -d read
02:30 on a spring-forward day as a real time. Refuse it before the
fallback, as the date utility does, and cover it with a -d test.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Reject nonexistent DST times consistently regardless of minute format
src/uu/touch/src/touch.rs:885
Include %Y-%m-%d %H:%M in this guard and add a regression test: with TZ=EST+5EDT,M3.2.0/2,M11.1.0/2, -d '2020-03-08 02:30' bypasses the gap check and reaches the normalizing fallback, while the equivalent input ending in :00 is rejected.
⚠️119 benchmarks spent significant time in system calls
System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.
The flamegraph could not be generated because too much time was spent in runtime internals, making the visualization not useful for performance analysis.
parse_datetime accepts 'YYYY-MM-DD HH:MM' and normalizes a time the zone
skipped, while the seconds forms were already refused. Check the minute-only
form too, with a regression test.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
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
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.
touch -dread a date without an offset, such as2026-08-01 12:00:00, as UTC. It now reads it in the system zone, as the documentation describes.This also changes dates that have an offset. The offset used to be dropped, so
2004-01-16 12:00 +0200was set to 12:00 UTC. It now honors the offset and sets 10:00 UTC.test_touch_set_date7has its expected value updated to match.Closes #15291
Integration tests set
TZto a non-UTC zone and check fixed timestamps for both forms. Run locally on Windows only. Six symlink tests fail there for a privilege reason, unrelated to this change.