Skip to content

Commit

Permalink
touch: move from time to chrono
Browse files Browse the repository at this point in the history
This allows us to work with daylight savings time which is necessary to enable one of the tests. The leap second calculation and parsing are also ported over. A bump in the chrono version is necessary to use NaiveTime::MIN.
  • Loading branch information
tertsdiepraam committed Mar 24, 2023
1 parent c8ece3e commit 4ff8b60
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 204 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ binary-heap-plus = "0.5.0"
bstr = "1.0"
bytecount = "0.6.3"
byteorder = "1.3.2"
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
chrono = { version="^0.4.24", default-features=false, features=["std", "alloc", "clock"]}
clap = { version = "4.1", features = ["wrap_help", "cargo"] }
clap_complete = "4.0"
clap_mangen = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion src/uu/touch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ path = "src/touch.rs"
[dependencies]
filetime = { workspace=true }
clap = { workspace=true }
time = { workspace=true, features = ["parsing", "formatting", "local-offset", "macros"] }
chrono = { workspace=true }
uucore = { workspace=true, features=["libc"] }

[target.'cfg(target_os = "windows")'.dependencies]
Expand Down
Loading

0 comments on commit 4ff8b60

Please sign in to comment.