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:
parent
7fe13be564
commit
dbeeb0f991
12 changed files with 78 additions and 75 deletions
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue