Skip to content

date: Does not correctly use UTC when TZ is empty #7498

@drinkcat

Description

@drinkcat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions