Update lots of dependencies

This commit is contained in:
Natsu Kagami 2023-02-17 14:19:46 +01:00
parent 59551f1f6a
commit 3a9a252a1d
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
8 changed files with 370 additions and 395 deletions

View file

@ -216,8 +216,8 @@ fn print_info_message<'a>(
contest
.start_time_seconds
.as_ref()
.map(|v| {
let ts = Utc.timestamp(*v as i64, 0);
.and_then(|v| Utc.timestamp_opt(*v as i64, 0).earliest())
.map(|ts| {
format!(
" | from {} ({})",
ts.format("<t:%s:F>"),

View file

@ -94,8 +94,11 @@ pub async fn watch_contest(
};
if contest.phase == ContestPhase::Before {
let start_time = match contest.start_time_seconds {
Some(s) => chrono::Utc.timestamp(s as i64, 0),
let start_time = match contest
.start_time_seconds
.and_then(|x| chrono::Utc.timestamp_opt(x as i64, 0).earliest())
{
Some(s) => s,
None => {
channel
.send_message(ctx, |f| {