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
date input: trailing TZ abbreviation (e.g. 2024-01-01 EST) keeps input TZ on output instead of re-zoning #281
When -d is given a date string with a trailing timezone abbreviation (e.g. 2024-01-01 EST), GNU date parses the instant and then displays it in the local TZ. uutils parses it correctly but keeps the result in the input's timezone for display, producing the wrong wall-clock time.
Found by a fuzz_date run on uutils/coreutils.
Reproduction
$ TZ=UTC+1 /usr/bin/date -d '2024-01-01 EST'Mon Jan 1 04:00:00 UTC 2024
$ TZ=UTC+1 target/debug/coreutils date -d '2024-01-01 EST'Mon Jan 1 00:00:00 -05 2024
$ TZ=UTC+1 /usr/bin/date -d '2024-01-01 EST''+%H:%M:%S %:z'04:00:00 -01:00
$ TZ=UTC+1 target/debug/coreutils date -d '2024-01-01 EST''+%H:%M:%S %:z'00:00:00 -05:00
Both parsed the instant correctly; the divergence is in how the resulting Zoned is re-projected into the local timezone before display.
It looks like the root cause is actually in uutils/coreutils (not parse_datetime): the dedicated abbreviation-aware path try_parse_with_abbreviation in src/uu/date/src/date.rs returns a Zoned in the input's timezone, while the generic parse_datetime fallback already re-zones to the local timezone for display. I'll prepare a fix against uutils/coreutils and link it back here.
Activity
0xSoftBoi commentedon May 15, 2026
I'd like to take a look at this.
It looks like the root cause is actually in
uutils/coreutils(notparse_datetime): the dedicated abbreviation-aware pathtry_parse_with_abbreviationinsrc/uu/date/src/date.rsreturns aZonedin the input's timezone, while the genericparse_datetimefallback already re-zones to the local timezone for display. I'll prepare a fix againstuutils/coreutilsand link it back here.0xSoftBoi commentedon May 16, 2026
PR up against
uutils/coreutils(fix is on the coreutils side as expected): uutils/coreutils#12327date: re-zone trailing TZ abbreviation input to local timezone (#12327)
date: re-zone trailing TZ abbreviation input to local timezone (uutil…