1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 19:36:16 +00:00

deps: bump time from 0.3.17 to 0.3.20 (#4643)

This commit is contained in:
Terts Diepraam 2023-03-26 21:47:12 +02:00 committed by GitHub
parent 8a3007efff
commit 74b54074e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 21 deletions

View file

@ -1211,7 +1211,7 @@ fn test_cp_no_deref_folder_to_folder() {
#[cfg(target_os = "linux")]
fn test_cp_archive() {
let (at, mut ucmd) = at_and_ucmd!();
let ts = time::OffsetDateTime::now_local().unwrap();
let ts = time::OffsetDateTime::now_utc();
let previous = FileTime::from_unix_time(ts.unix_timestamp() - 3600, ts.nanosecond());
// set the file creation/modification an hour ago
filetime::set_file_times(
@ -1304,7 +1304,7 @@ fn test_cp_archive_recursive() {
#[cfg(any(target_os = "linux", target_os = "android"))]
fn test_cp_preserve_timestamps() {
let (at, mut ucmd) = at_and_ucmd!();
let ts = time::OffsetDateTime::now_local().unwrap();
let ts = time::OffsetDateTime::now_utc();
let previous = FileTime::from_unix_time(ts.unix_timestamp() - 3600, ts.nanosecond());
// set the file creation/modification an hour ago
filetime::set_file_times(
@ -1337,7 +1337,7 @@ fn test_cp_preserve_timestamps() {
#[cfg(any(target_os = "linux", target_os = "android"))]
fn test_cp_no_preserve_timestamps() {
let (at, mut ucmd) = at_and_ucmd!();
let ts = time::OffsetDateTime::now_local().unwrap();
let ts = time::OffsetDateTime::now_utc();
let previous = FileTime::from_unix_time(ts.unix_timestamp() - 3600, ts.nanosecond());
// set the file creation/modification an hour ago
filetime::set_file_times(

View file

@ -618,7 +618,7 @@ fn test_mv_update_option() {
at.touch(file_a);
at.touch(file_b);
let ts = time::OffsetDateTime::now_local().unwrap();
let ts = time::OffsetDateTime::now_utc();
let now = FileTime::from_unix_time(ts.unix_timestamp(), ts.nanosecond());
let later = FileTime::from_unix_time(ts.unix_timestamp() + 3600, ts.nanosecond());
filetime::set_file_times(at.plus_as_string(file_a), now, now).unwrap();

View file

@ -103,10 +103,7 @@ fn test_touch_set_mdhm_time() {
let start_of_year = str_to_filetime(
"%Y%m%d%H%M",
&format!(
"{}01010000",
time::OffsetDateTime::now_local().unwrap().year()
),
&format!("{}01010000", time::OffsetDateTime::now_utc().year()),
);
let (atime, mtime) = get_file_times(&at, file);
assert_eq!(atime, mtime);