mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-20 09:18:54 +00:00
Use relative time for contest timing
This commit is contained in:
parent
8632f0e99c
commit
cfb0f9de8b
1 changed files with 6 additions and 1 deletions
|
@ -201,7 +201,12 @@ fn print_info_message<'a>(
|
||||||
.start_time_seconds
|
.start_time_seconds
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|v| {
|
.map(|v| {
|
||||||
format!(" | from **{}**", Utc.timestamp(*v as i64, 0).to_rfc2822())
|
let ts = Utc.timestamp(*v as i64, 0);
|
||||||
|
format!(
|
||||||
|
" | from {} ({})",
|
||||||
|
ts.format("<t:%s:F>"),
|
||||||
|
ts.format("<t:%s:R>")
|
||||||
|
)
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| "".to_owned()),
|
.unwrap_or_else(|| "".to_owned()),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue