1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

time: take in account the local tz

This commit is contained in:
Sylvestre Ledru 2022-04-24 09:51:15 +02:00
parent 326dc5080d
commit 10eaaae272
2 changed files with 41 additions and 5 deletions

View file

@ -292,7 +292,22 @@ fn test_date() {
#[cfg(any(target_os = "linux", target_os = "android"))]
"%z",
#[cfg(target_os = "linux")]
"/dev/pts/ptmx",
"/bin/sh",
#[cfg(any(target_vendor = "apple"))]
"%z",
#[cfg(any(target_os = "android", target_vendor = "apple"))]
"/bin/sh",
];
let ts = TestScenario::new(util_name!());
let expected_stdout = unwrap_or_return!(expected_result(&ts, &args)).stdout_move_str();
ts.ucmd().args(&args).succeeds().stdout_is(expected_stdout);
// Just test the date for the time 0.3 change
let args = [
"-c",
#[cfg(any(target_os = "linux", target_os = "android"))]
"%z",
#[cfg(target_os = "linux")]
"/dev/ptmx",
#[cfg(any(target_vendor = "apple"))]
"%z",
#[cfg(any(target_os = "android", target_vendor = "apple"))]