mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-22 02:54:21 +00:00
Fix matchmaking time displayed as UTC (#13)
Co-authored-by: Stefano Pigozzi <me@steffo.eu>
This commit is contained in:
parent
f2d863f5c2
commit
548cf714e8
1 changed files with 9 additions and 1 deletions
|
@ -21,6 +21,9 @@ pub(crate) mod telegram_ext {
|
|||
use std::cmp::Ordering;
|
||||
use std::str::FromStr;
|
||||
use anyhow::Context;
|
||||
use chrono::DateTime;
|
||||
use chrono::Local;
|
||||
use matchmaking_messages_telegram::star;
|
||||
use super::*;
|
||||
use diesel::PgConnection;
|
||||
use teloxide::payloads::SendMessageSetters;
|
||||
|
@ -139,7 +142,12 @@ pub(crate) mod telegram_ext {
|
|||
let text = event.text.as_str().escape_telegram_html();
|
||||
writeln!(result, "{emoji} <b>{text}</b>").unwrap();
|
||||
|
||||
let start = event.starts_at.format("%c").to_string().escape_telegram_html();
|
||||
let start = event.starts_at
|
||||
.and_utc()
|
||||
.with_timezone(&Local)
|
||||
.format("%c")
|
||||
.to_string()
|
||||
.escape_telegram_html();
|
||||
writeln!(result, "<i>{start}</i>").unwrap();
|
||||
|
||||
writeln!(result).unwrap();
|
||||
|
|
Loading…
Reference in a new issue