mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Merge pull request #6149 from mvo5/fix-deprecated-timestamp_subsec_nanos
tests: fix deprecation warning `timestamp_subsec_nanos()`
This commit is contained in:
commit
4a64337f52
1 changed files with 4 additions and 1 deletions
|
@ -34,7 +34,10 @@ fn set_file_times(at: &AtPath, path: &str, atime: FileTime, mtime: FileTime) {
|
||||||
|
|
||||||
fn str_to_filetime(format: &str, s: &str) -> FileTime {
|
fn str_to_filetime(format: &str, s: &str) -> FileTime {
|
||||||
let tm = chrono::NaiveDateTime::parse_from_str(s, format).unwrap();
|
let tm = chrono::NaiveDateTime::parse_from_str(s, format).unwrap();
|
||||||
FileTime::from_unix_time(tm.and_utc().timestamp(), tm.timestamp_subsec_nanos())
|
FileTime::from_unix_time(
|
||||||
|
tm.and_utc().timestamp(),
|
||||||
|
tm.and_utc().timestamp_subsec_nanos(),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue