mirror of
https://github.com/chronotope/chrono.git
synced 2025-09-27 04:50:52 +00:00
Fix tests on AIX
- Add AIX timezone database path to search list. - Use date program from freeware to do the testing.
This commit is contained in:
parent
f87d548601
commit
8df1ba108f
@ -620,8 +620,8 @@ fn saturating_abs(v: i32) -> i32 {
|
||||
|
||||
// Possible system timezone directories
|
||||
#[cfg(unix)]
|
||||
const ZONE_INFO_DIRECTORIES: [&str; 3] =
|
||||
["/usr/share/zoneinfo", "/share/zoneinfo", "/etc/zoneinfo"];
|
||||
const ZONE_INFO_DIRECTORIES: [&str; 4] =
|
||||
["/usr/share/zoneinfo", "/share/zoneinfo", "/etc/zoneinfo", "/usr/share/lib/zoneinfo"];
|
||||
|
||||
/// Number of seconds in one week
|
||||
pub(crate) const SECONDS_PER_WEEK: i64 = SECONDS_PER_DAY * DAYS_PER_WEEK;
|
||||
|
@ -55,7 +55,10 @@ fn verify_against_date_command_local(path: &'static str, dt: NaiveDateTime) {
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn try_verify_against_date_command() {
|
||||
#[cfg(not(target_os = "aix"))]
|
||||
let date_path = "/usr/bin/date";
|
||||
#[cfg(target_os = "aix")]
|
||||
let date_path = "/opt/freeware/bin/date";
|
||||
|
||||
if !path::Path::new(date_path).exists() {
|
||||
// date command not found, skipping
|
||||
|
Loading…
x
Reference in New Issue
Block a user