date, touch: parsing date’s own output in Asia/Shanghai moves the timestamp forward 14 hours
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reproducing the report with the commands in the issue body under TZ=Asia/Shanghai and LC_ALL=C, comparing uutils date and touch against GNU output. The issue links uutils/parse_datetime#358 and #11045, so check whether the fault is in how the default date format is parsed or in the parse_datetime dependency. Done means date -d and touch -d round-trip the default output to the same instant in Asia/Shanghai, Asia/Taipei and Europe/Dublin, matching GNU.
索引モデルが issue の本文から書いたものです。
説明
In Asia/Shanghai, date prints local noon on June 1 and then reads that same string as 02:00 on June 2. touch -d writes the same incorrect file timestamp. Both commands exit 0.
export LC_ALL=C TZ=Asia/Shanghai
stamp=$(date -d @1717214400)
printf '%s\n' "$stamp" # Sat Jun 1 12:00:00 CST 2024
date -d "$stamp" '+%s %F %T %z'
f=$(mktemp) && touch -d "$stamp" "$f" && date -r "$f" '+%s %F %T %z'
Both result lines on uutils: 1717264800 2024-06-02 02:00:00 +0800. On GNU: 1717214400 2024-06-01 12:00:00 +0800. Both implementations initially print the same string. Using +%F %T %z to include the numeric offset preserves the instant in both.
The default date output also shifts by +14h in Asia/Taipei and by -4h30m in Europe/Dublin for this June timestamp. Verified on x86_64 Linux with uutils 0.12.0, 0.13.0 and main at 791399596cc7214e76c0c6bd022332ab6048ec65, compared with GNU coreutils 9.7 and 9.12. Related work: #11045 and uutils/parse_datetime#358.
- 主要言語
- Rust
- スター
- 24.4k
- フォーク
- 2.2k
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 402
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
uutils/coreutils のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
split -n leaves bytes from a previous run in chunks that should be empty対応中かも @costajohnt が 2 日前に担当しました。 オープンU - split
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
dircolors: '=' is not escaped and '^'/'\\' do not toggle the backslash state, unlike GNU再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンU - dircolors
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信
-
U - shred
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
chown -v: `+ID` spec echoed verbatim on a broken symlink対応中かも @sunsss123soldier が 7 日前に担当しました。 オープンgood first issue oss-scanner U - chown
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
uutils/coreutils の issue をすべて見る
似ている issue
-
marketing
難易度 2/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
S: Untriaged T: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
libnyanpasu/clash-nyanpasu#6537 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 62/100
tauri-apps/tao#1445 ·
メンテナーはふだん 1 日以内に返信
-
bug P3
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
go good first issue test
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信