uutils / uutils/coreutils

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

Open
#12,954 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - date
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided date commands under America/Los_Angeles, then trace the date command's local-time parsing and timezone conversion. Compare standard-time and daylight-saving results with TZ=UTC and GNU date. Done means the listed PST inputs round-trip to the requested local date and time without changing the existing PDT and UTC behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.