Skip to content

Commit f70318b

Browse files
committed
feat: better time fmt
1 parent 4a7a254 commit f70318b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/infra/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ where
3838
let diff = current_time.clone() - time_to_fmt.clone();
3939
match diff {
4040
// In the future
41-
_ if diff.num_milliseconds() < 0 => time_to_fmt.format("%Y-%m-%d %H:%M").to_string(),
41+
_ if diff.num_milliseconds() < 0 => time_to_fmt.format("%y-%-m-%-d %-H:%M").to_string(),
4242
// Same year...
4343
_ if time_to_fmt.year() != current_time.year() => {
4444
time_to_fmt.format("%Y-%m-%d").to_string()

0 commit comments

Comments
 (0)