Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

touch -m -h -d 2009-10-10 link is failing with "Unable to parse date" #2311

Closed
sylvestre opened this issue May 30, 2021 · 3 comments
Closed
Labels
good first issue For newcomers!

Comments

@sylvestre
Copy link
Sponsor Contributor

With

touch a 
ln -s a link
touch -m -h -d 2009-10-10 link

works with gnu
but fails on us with

$ ./target/release/coreutils touch -m -h -d 2009-10-10 link
thread 'main' panicked at 'Unable to parse date
Invalid day.', src/uu/touch/src/touch.rs:243:19
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Code is in:
https://github.com/uutils/coreutils/blob/master/src/uu/touch/src/touch.rs#L243

@sylvestre sylvestre added the good first issue For newcomers! label May 30, 2021
@SuperSandro2000
Copy link
Contributor

Encountered a similar problem in NixOS/nixpkgs#116274

touch --date '2021-05-30 16:59:52.627421773 +0000' /nix/store/hf1cjsvzyv8mfazndnycln2zy57hqfbz-ed-1.17/bin/red
thread 'main' panicked at 'Unable to parse date
Invalid day.', src/uu/touch/src/touch.rs:248:19
stack backtrace:
   0: rust_begin_unwind
   1: std::panicking::begin_panic_fmt
   2: uu_touch::parse_date
   3: uu_touch::uumain
   4: coreutils::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

deantvv added a commit to deantvv/coreutils that referenced this issue May 31, 2021
Now it can parse `touch -d 2000-01-23 file`

Related to uutils#2311
deantvv added a commit to deantvv/coreutils that referenced this issue May 31, 2021
Now it can parse `touch -d 2000-01-23 file` and add test for parse date
error.

Related to uutils#2311
@siraben
Copy link

siraben commented Jun 3, 2021

Is this still an issue?

@SuperSandro2000
Copy link
Contributor

This was fixed in #2317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue For newcomers!
Projects
None yet
Development

No branches or pull requests

4 participants