mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-15 03:26:18 +00:00
Merge pull request #6047 from cakebaker/bump_chrono
Bump chrono to 0.4.35 & replace usage of deprecated functions
This commit is contained in:
commit
8c7940260b
5 changed files with 8 additions and 7 deletions
|
@ -32,7 +32,7 @@ fn set_file_times(at: &AtPath, path: &str, atime: FileTime, mtime: FileTime) {
|
|||
|
||||
fn str_to_filetime(format: &str, s: &str) -> FileTime {
|
||||
let tm = chrono::NaiveDateTime::parse_from_str(s, format).unwrap();
|
||||
FileTime::from_unix_time(tm.timestamp(), tm.timestamp_subsec_nanos())
|
||||
FileTime::from_unix_time(tm.and_utc().timestamp(), tm.timestamp_subsec_nanos())
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue