1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-04 02:09:26 +02:00

Switch from chrono to time

This commit is contained in:
Roderick van Domburg 2022-01-14 23:28:09 +01:00
parent 7fe13be564
commit dbeeb0f991
No known key found for this signature in database
GPG key ID: A9EF5222A26F0451
12 changed files with 78 additions and 75 deletions

View file

@ -3,7 +3,6 @@ use std::{
ops::{Deref, DerefMut},
};
use chrono::Local;
use protobuf::Message;
use thiserror::Error;
use url::Url;
@ -84,9 +83,9 @@ impl CdnUrl {
return Err(CdnUrlError::Unresolved.into());
}
let now = Local::now();
let now = Date::now_utc();
let url = self.urls.iter().find(|url| match url.1 {
Some(expiry) => now < expiry.as_utc(),
Some(expiry) => now < expiry,
None => true,
});