Skip to content

date: Parsed local times during PST are shifted one hour earlier than requested (via ChatGPT) #12954

Closed

Description

@sedwards58

Version
date (uutils coreutils) 0.2.2
Environment
Timezone: America/Los_Angeles
TZ environment variable: unset

Current system time:

Wed Jun 17 21:20:44 PDT 2026
Description

When parsing local date/time strings during periods when America/Los_Angeles is in standard time (PST, UTC-0800), date returns a time one hour earlier than requested.

The same commands work correctly:

with GNU coreutils date
when TZ=UTC
during daylight saving time (PDT)

This suggests an issue in local timezone handling during PST.

Reproducer
$ date --version
date (uutils coreutils) 0.2.2

Date-only input:

$ date --date="2025-11-16" +'%F %T %z %Z'
2025-11-15 23:00:00 -0800 PST

Expected:

2025-11-16 00:00:00 -0800 PST

Date/time input:

$ date --date="2025-12-15 12:00:00" +'%F %T %z %Z'
2025-12-15 11:00:00 -0800 PST

Expected:

2025-12-15 12:00:00 -0800 PST

Additional examples:

$ date --date="2025-01-15 12:00:00" +'%F %T %z %Z'
2025-01-15 11:00:00 -0800 PST

$ date --date="2025-06-15 12:00:00" +'%F %T %z %Z'
2025-06-15 12:00:00 -0700 PDT

$ date --date="2025-12-15 12:00:00" +'%F %T %z %Z'
2025-12-15 11:00:00 -0800 PST
UTC comparison

UTC behaves correctly:

$ TZ=UTC date --date="2025-11-16 12:00:00" +'%F %T %z %Z'
2025-11-16 12:00:00 +0000 UTC

$ TZ=UTC date --date="2025-11-16" +'%F %T %z %Z'
2025-11-16 00:00:00 +0000 UTC
GNU coreutils comparison
$ gnudate --date="2025-11-16" +'%F %T'
2025-11-16 00:00:00

$ gnudate --date="2025-12-15 12:00:00" +'%F %T %z %Z'
2025-12-15 12:00:00 -0800 PST
Observed behavior

The issue appears only during standard time (PST). Parsed local timestamps are shifted one hour earlier than requested, while UTC parsing and PDT dates are correct.

Expected behavior

Local date/time strings should round-trip exactly as entered:

2025-12-15 12:00:00 -> 2025-12-15 12:00:00 PST
2025-11-16 -> 2025-11-16 00:00:00 PST

instead of being shifted back one hour.

Activity

  1. cakebaker commented on Jun 18, 2026

    @cakebaker
    Contributor

    Can you please try it with the most recent version (v0.9.0)? v0.2.2 is very old.

  2. xtqqczze commented on Oct 10, 2026

    @xtqqczze
    Collaborator

    @sedwards58 Does this still reproduce?

  3. anastygnome commented on Oct 10, 2026

    @anastygnome
    Contributor

    @xtqqczze I've checked and it does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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