From cfb0f9de8b0f6121b9b1bcaf8e2a47bea18b87ba Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Tue, 14 Jun 2022 18:05:16 -0400 Subject: [PATCH] Use relative time for contest timing --- youmubot-cf/src/hook.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/youmubot-cf/src/hook.rs b/youmubot-cf/src/hook.rs index 23fc3e9..0975257 100644 --- a/youmubot-cf/src/hook.rs +++ b/youmubot-cf/src/hook.rs @@ -201,7 +201,12 @@ fn print_info_message<'a>( .start_time_seconds .as_ref() .map(|v| { - format!(" | from **{}**", Utc.timestamp(*v as i64, 0).to_rfc2822()) + let ts = Utc.timestamp(*v as i64, 0); + format!( + " | from {} ({})", + ts.format(""), + ts.format("") + ) }) .unwrap_or_else(|| "".to_owned()), )