From 50f410d9fd76c2fbd07413382dff191e199b4cab Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Mon, 11 Nov 2024 23:06:53 +0100 Subject: [PATCH] allow m in dd --- src/tera/ergo.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tera/ergo.rs b/src/tera/ergo.rs index 4e93c4e..1ad9ecf 100644 --- a/src/tera/ergo.rs +++ b/src/tera/ergo.rs @@ -281,8 +281,13 @@ async fn new_dozen( if let Err(e) = data.proof.move_copy_to(file_path).await { eprintln!("Failed to persist file: {:?}", e); } - let result = data.result.trim_start_matches(|c| c == '0' || c == ' '); - let result = format_time(result); + let result = data.result.trim(); + let result = if result.len() == 4 { +result.to_string() + }else{ + let result = result.trim_start_matches(|c| c == '0' || c == ' '); + format_time(result) + }; sqlx::query!( "UPDATE user SET dirty_dozen = ? where id = ?",