Skip to content

Commit

Permalink
deps: bump time from 0.3.17 to 0.3.20
Browse files Browse the repository at this point in the history
  • Loading branch information
tertsdiepraam committed Mar 26, 2023
1 parent ef601fa commit 50a763c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 21 deletions.
8 changes: 0 additions & 8 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,3 @@ rustflags = [
"-Wclippy::explicit_iter_loop",
]

[build]
# See https:/time-rs/time/issues/293#issuecomment-1005002386. The
# unsoundness here is not in the `time` library, but in the Rust stdlib, and as
# such it needs to be fixed there.
rustflags = ["--cfg", "unsound_local_offset"]

[target.'cfg(target_os = "linux")']
rustflags = ["--cfg", "unsound_local_offset"]
2 changes: 1 addition & 1 deletion .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ jobs:
- name: Test
run: cargo test -v ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} -p uucore -p coreutils
env:
RUSTFLAGS: "-Awarnings --cfg unsound_local_offset"
RUSTFLAGS: "-Awarnings"
RUST_BACKTRACE: "1"

deps:
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions tests/by-util/test_cp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_mv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 1 addition & 4 deletions tests/by-util/test_touch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 50a763c

Please sign in to comment.