mirror of
https://github.com/forkless/NotAlterra.git
synced 2026-08-18 17:22:32 +02:00
Date format: YYYY-Mon-DD HH:MM everywhere
This commit is contained in:
+1
-1
@@ -417,7 +417,7 @@ mod tests {
|
||||
let size = entry.metadata().map(|m| m.len()).unwrap_or(0);
|
||||
let mtime = entry.metadata().ok().and_then(|m| m.modified().ok())
|
||||
.and_then(|t| { let s = t.duration_since(std::time::UNIX_EPOCH).ok()?.as_secs(); chrono::Local.timestamp_opt(s as i64,0).single() })
|
||||
.map(|dt| dt.format("%Y-%m-%d %H:%M:%S").to_string());
|
||||
.map(|dt| dt.format("%Y-%b-%d %H:%M").to_string());
|
||||
let meta = extract_metadata(&path).ok();
|
||||
let slot = meta.as_ref().and_then(|m| m.slot_name.clone())
|
||||
.unwrap_or_else(|| derive_slot_from_filename(&name).unwrap_or_else(|| "?".into()));
|
||||
|
||||
+1
-1
@@ -531,7 +531,7 @@ fn action_recover_bak<B: Backend>(terminal: &mut Terminal<B>, app: &mut App) ->
|
||||
];
|
||||
let tgt_line: String;
|
||||
if let Some((sz, mt, _, _)) = &target_meta {
|
||||
tgt_line = format!("{} {} {}", target, format_size(*sz), mt.map(|d| d.format("%Y-%m-%d %H:%M").to_string()).as_deref().unwrap_or("?"));
|
||||
tgt_line = format!("{} {} {}", target, format_size(*sz), mt.map(|d| d.format("%Y-%b-%d %H:%M").to_string()).as_deref().unwrap_or("?"));
|
||||
details.push(("Replace", tgt_line.as_str()));
|
||||
} else {
|
||||
details.push(("Create", target.as_str()));
|
||||
|
||||
+1
-1
@@ -353,7 +353,7 @@ pub fn list_bak_files_with_meta(save_folder: &Path) -> Vec<BakFileSummary> {
|
||||
Local
|
||||
.timestamp_opt(secs as i64, 0)
|
||||
.single()
|
||||
.map(|dt| dt.format("%Y-%m-%d %H:%M").to_string())
|
||||
.map(|dt| dt.format("%Y-%b-%d %H:%M").to_string())
|
||||
});
|
||||
|
||||
// Use filename-derived slot for grouping (authoritative).
|
||||
|
||||
Reference in New Issue
Block a user