mirror of
https://github.com/chronotope/chrono.git
synced 2025-10-02 07:21:41 +00:00
Don't use deprecated method in wasm test
This commit is contained in:
parent
02a96eba57
commit
3e6fa4c0df
@ -22,7 +22,7 @@ fn now() {
|
|||||||
|
|
||||||
// Ensure time set by the test script is correct
|
// Ensure time set by the test script is correct
|
||||||
let now = env!("NOW");
|
let now = env!("NOW");
|
||||||
let actual = Utc.datetime_from_str(&now, "%s").unwrap();
|
let actual = NaiveDateTime::parse_from_str(&now, "%s").unwrap().and_utc();
|
||||||
let diff = utc - actual;
|
let diff = utc - actual;
|
||||||
assert!(
|
assert!(
|
||||||
diff < chrono::Duration::minutes(5),
|
diff < chrono::Duration::minutes(5),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user