1
Fork 0
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:
Sylvestre Ledru 2024-03-10 07:51:50 +01:00 committed by GitHub
commit 8c7940260b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 7 deletions

View file

@ -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]