find: -printf %A@ and %T@ reject timestamps before 1970
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
The issue points to src/find/matchers/printf.rs, where TimeFormat::SinceEpoch calls duration_since(UNIX_EPOCH)?. Read that implementation and inspect nearby tests for %A@ and %T@; reproduce with the issue’s pre-1970 example. Done means -printf and -fprintf print negative epoch seconds, including fractional timestamps, without the error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
%A@ and %T@ should print negative epoch seconds for files whose access or modification time is before 1970. Current main instead reports an error and stops rendering the format for that file, while still exiting 0.
From the repository root after building:
uu_find="$PWD/target/debug/find"
tmp=$(mktemp -d)
(
cd "$tmp" || exit
touch -a -m -d '1969-12-31 23:59:59 UTC' file
LC_ALL=C /usr/bin/find file -printf '%A@|%T@\n'
LC_ALL=C "$uu_find" file -printf '%A@|%T@\n'
)
GNU findutils 4.11.0 prints:
-1.0000000000|-1.0000000000
uutils prints no stdout and reports:
Error processing 'file': second time provided was later than self
Both exit 0. The same problem occurs with -fprintf, and fractional timestamps before the epoch also fail. Timestamps at or after the epoch work.
TimeFormat::SinceEpoch uses duration_since(UNIX_EPOCH)?, which rejects negative offsets. This is separate from #914, which fixes pre-1970 comparisons for -newerXt.
Tested with uutils findutils 0.11.0, main 82cfc21f0d45fc654588f0f4243e9c6e5f57fc97, on Debian forky/sid, Linux x86_64, against /usr/bin/find from GNU findutils 4.11.0.
- Ngôn ngữ chính
- Rust
- Star
- 657
- Fork
- 115
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của uutils/findutils
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
uutils/findutils#692 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
find on Windows: opt in to / as the path separatorCó thể đã có người làm @mutewinter đã nhận 24 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
-
xargs: -x runs a pending command before rejecting an oversized argumentCó thể đã có người làm @SichenLiang đã nhận 26 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 28/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của uutils/findutils
Issue tương tự
-
needs-triage tooling
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
neilsh/stunt-reel#317 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
storytold/craft-fonts#65 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
storytold/craft-libs#723 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
n0-computer/iroh#4669 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày