Merge branch 'master' into master

This commit is contained in:
Vukašin Vojinović 2024-07-12 19:46:53 +02:00 committed by GitHub
commit 8efc6084ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 310 additions and 393 deletions

View file

@ -808,21 +808,24 @@ impl Item {
if let Ok(time) = metadata.created() {
column = column.push(widget::text(format!(
"Created: {}",
chrono::DateTime::<chrono::Local>::from(time).format(TIME_FORMAT)
chrono::DateTime::<chrono::Local>::from(time)
.format_localized(TIME_FORMAT, *LANGUAGE_CHRONO)
)));
}
if let Ok(time) = metadata.modified() {
column = column.push(widget::text(format!(
"Modified: {}",
chrono::DateTime::<chrono::Local>::from(time).format(TIME_FORMAT)
chrono::DateTime::<chrono::Local>::from(time)
.format_localized(TIME_FORMAT, *LANGUAGE_CHRONO)
)));
}
if let Ok(time) = metadata.accessed() {
column = column.push(widget::text(format!(
"Accessed: {}",
chrono::DateTime::<chrono::Local>::from(time).format(TIME_FORMAT)
chrono::DateTime::<chrono::Local>::from(time)
.format_localized(TIME_FORMAT, *LANGUAGE_CHRONO)
)));
}
}
@ -862,7 +865,8 @@ impl Item {
if let Ok(time) = metadata.modified() {
column = column.push(widget::text(format!(
"Last modified: {}",
chrono::DateTime::<chrono::Local>::from(time).format(TIME_FORMAT)
chrono::DateTime::<chrono::Local>::from(time)
.format_localized(TIME_FORMAT, *LANGUAGE_CHRONO)
)));
}
}
@ -2569,7 +2573,7 @@ impl Tab {
let modified_text = match &item.metadata {
ItemMetadata::Path { metadata, .. } => match metadata.modified() {
Ok(time) => chrono::DateTime::<chrono::Local>::from(time)
.format(TIME_FORMAT)
.format_localized(TIME_FORMAT, *LANGUAGE_CHRONO)
.to_string(),
Err(_) => String::new(),
},