coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

date: Does not correctly use `UTC` when `TZ` is empty

Open drinkcat opened this issue 7 months ago • 0 comments

My local timezone in /etc/localtime is CET (Central Europe), 1 hour ahead of UTC this time of the year.

$ LANG= cargo run date
Wed Mar 19 20:18:08 CET 2025
$ LANG= TZ= cargo run date
Wed Mar 19 20:18:13 UTC 2025

The second output should be 1 hour behind.

coreutils:

$ LANG= date
Wed Mar 19 20:18:17 CET 2025
$ LANG= TZ= date
Wed Mar 19 19:18:19 UTC 2025

(Setting TZ=UTC prints the correct time, but then we hit #7497.)

drinkcat avatar Mar 19 '25 19:03 drinkcat