touch -d interprets a date/time without timezone as UTC instead of local time
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Start by tracing how touch -d parses date and time input and applies timestamps, then compare the timezone handling with GNU touch’s documented behavior. Reproduce the issue with a timezone such as Europe/Rome and a date without an explicit timezone; done means the timestamp matches the requested local time in both summer and winter.
索引モデルが issue の本文から書いたものです。
説明
Description
touch -d with a date and time without an explicit timezone sets the
timestamp as if the time were UTC. GNU touch interprets it as local
time, as documented.
Steps to reproduce
$ timedatectl show -p Timezone
Timezone=Europe/Rome
$ touch -d "2026-08-01 12:00:00" t-rust
$ gnutouch -d "2026-08-01 12:00:00" t-gnu
$ ls -l --time-style=full-iso t-rust t-gnu
Actual result (uutils)
-rw-rw-r-- 1 user user 0 2026-08-01 14:00:00.000000000 +0200 t-rust
Expected result (GNU coreutils)
-rw-rw-r-- 1 user user 0 2026-08-01 12:00:00.000000000 +0200 t-gnu
With a winter date ("2020-01-01 12:00:00") the result is 13:00 +0100,
so the error is always the UTC offset of the given date.
Environment
- touch (uutils coreutils) 0.10.0
- Kubuntu 26.04 LTS, kernel 7.0.0-38-generic
- Timezone: Europe/Rome
- 主要言語
- Rust
- スター
- 24.3k
- フォーク
- 2.1k
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 380
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
uutils/coreutils のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
fold: tab after an 8 KiB buffer flush exceeds the requested width対応中かも @gibkim が 1 日前に担当しました。 オープンU - fold
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
ls: `--block-size=0` is accepted when `--si` comes later対応中かも @Logic769 が 4 日前に担当しました。 オープンgood first issue U - ls
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
uutils/coreutils#15962 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
B - high priority U - tr
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
uutils/coreutils の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
limitlessprojects/Go-Hybrid#3342 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
librespeed/speedtest-rust#52 · コメント 1 件 ·
-
enhancement needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bherbruck/solvecraft#11246 · コメント 1 件 · リアクション 1 件 ·
-
example
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rust-lang-nursery/rust-cookbook#954 ·
メンテナーはふだん 1 日以内に返信