Skip to content

Commit

Permalink
remove deprecations for chronos::MAX_DATE
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Wrock <[email protected]>
  • Loading branch information
mwrock committed May 22, 2024
1 parent 07230e6 commit cc355fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/builder-core/src/access_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{crypto,
protocol::{message,
originsrv}};
use chrono::{self,
DateTime,
Duration,
LocalResult::Single,
TimeZone,
Expand Down Expand Up @@ -146,7 +147,7 @@ impl AccessToken {
/// protobuf-generated code :/
fn new_proto(account_id: u64, flags: u32, lifetime: Duration) -> originsrv::AccessToken {
let expires = Utc::now().checked_add_signed(lifetime)
.unwrap_or_else(|| chrono::MAX_DATE.and_hms(0, 0, 0))
.unwrap_or(DateTime::<Utc>::MAX_UTC)
.timestamp();

let mut token = originsrv::AccessToken::new();
Expand Down

0 comments on commit cc355fc

Please sign in to comment.