Fix for test

This commit is contained in:
ShadoySV 2020-08-05 13:31:25 +03:00
parent 93e6a611d6
commit 31e3e1602e

View File

@ -3,7 +3,6 @@
//! The local (system) time zone.
#[cfg(not(all(target_arch = "wasm32", not(target_os = "wasi"), feature = "wasmbind")))]
use oldtime;
use super::fixed::FixedOffset;
@ -152,7 +151,7 @@ impl TimeZone for Local {
let mut local = local.clone();
// Get the offset from the js runtime
let offset = FixedOffset::west((js_sys::Date::new_0().get_timezone_offset() as i32) * 60);
local -= crate::Duration::seconds(offset.local_minus_utc() as i64);
local -= oldtime::Duration::seconds(offset.local_minus_utc() as i64);
LocalResult::Single(DateTime::from_utc(local, offset))
}