touch -d interprets a date/time without timezone as UTC instead of local time

オープン
#15,291 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@jay23606 がすでに取り組んでいます。

2026年10月13日 から。

  • #15292 @jay23606 による — オープン
  • #15353 @tasodoufu による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
cli

調査の方向性

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 の本文から書いたものです。

説明

U - touch
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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

uutils/coreutils のほかの issue

uutils/coreutils の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。