Skip to content

date: rfc-822 shows time off by an hour #12555

@NickJackolson

Description

@NickJackolson

Machine Info:

$ uname -a
Linux localhost 7.0.0-15-generic #15-Ubuntu SMP PREEMPT Wed Apr 22 15:04:00 UTC 2026 s390x GNU/Linux

$ date --version
date (uutils coreutils) 0.8.0

When timezone is set to UTC rfc-822 matches the time

$ timedatectl show
Timezone=Etc/UTC
LocalRTC=no
CanNTP=yes
NTP=yes
NTPSynchronized=yes
TimeUSec=Mon 2026-06-01 12:55:55 UTC

$ date
Mon Jun  1 12:54:58 PM UTC 2026

$ date --rfc-822 -d "1970/01/01 UTC $(date '+%s') seconds"
Mon, 01 Jun 2026 12:54:55 +0000

When timezone is set to CEST rfc-822 output is off by one hour

$ timedatectl show
Timezone=Europe/Berlin
LocalRTC=no
CanNTP=yes
NTP=yes
NTPSynchronized=yes
TimeUSec=Mon 2026-06-01 14:57:52 CEST

$ date
Mon Jun  1 02:57:16 PM CEST 2026

$ date --rfc-822 -d "1970/01/01 UTC $(date '+%s') seconds"
Mon, 01 Jun 2026 15:57:19 +0200

$ date --rfc-822 -d "1970/01/01 CEST $(date '+%s') seconds"
Mon, 01 Jun 2026 14:02:07 +0200

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions