Skip to content

Commit

Permalink
fix deprecations from chrono update
Browse files Browse the repository at this point in the history
  • Loading branch information
internet-catte authored and spb committed Jul 2, 2024
1 parent 9ce3408 commit 7d27069
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sable_ircd/src/utils/time_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub fn format_timestamp(ts: i64) -> String {
}

pub fn parse_timestamp(str: &str) -> Option<i64> {
Utc.datetime_from_str(str, "%+")
.map(|dt| dt.timestamp())
NaiveDateTime::parse_from_str(str, "%+")
.map(|dt| dt.and_utc().timestamp())
.ok()
}

0 comments on commit 7d27069

Please sign in to comment.