Thanks to visit codestin.com
Credit goes to github.com

Skip to content

date: --date returns wrong time, off by 1 hour #8976

@tomasmatus

Description

@tomasmatus

On Ubuntu 25.10 I noticed that date returns wrong/different time than GNU coreutils. I'm also adding output of timedatectl just to verify that both machines run in the same timezone should this be related in any way.

Ubuntu 25.10:

root@ubuntu:~# timedatectl
               Local time: Wed 2025-10-22 13:53:03 CEST
           Universal time: Wed 2025-10-22 11:53:03 UTC
                 RTC time: Wed 2025-10-22 11:53:04
                Time zone: Europe/Prague (CEST, +0200)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no

root@ubuntu:~# date --date="2031-01-26 8:30"
Sun Jan 26 07:30:00 CET 2031

Fedora 42:

❯ timedatectl
               Local time: Wed 2025-10-22 13:53:55 CEST
           Universal time: Wed 2025-10-22 11:53:55 UTC
                 RTC time: Wed 2025-10-22 11:53:55
                Time zone: Europe/Prague (CEST, +0200)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

❯ date --date="2031-01-26 8:30"
Sun Jan 26 08:30:00 AM CET 2031

As you can see on ubuntu 25.10 this returns 07:30:00 time whereas on Fedora I'm getting 08:30:00.

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