properly handle timezone in --interactive

This commit is contained in:
Abraham Toriz 2022-08-28 16:49:31 -04:00
parent 88371b312e
commit ca7c424b46
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
1 changed files with 2 additions and 2 deletions

View File

@ -11,6 +11,7 @@ use crate::commands::Facts;
use crate::models::Entry;
use crate::tabulate::{Tabulate, Col, Align};
use crate::formatters::text::format_duration;
use crate::old::entries_or_warning;
fn read_line<I: BufRead>(mut r#in: I) -> io::Result<String> {
let mut pre_n = String::new();
@ -65,6 +66,7 @@ where
E: Write,
{
let entries = streams.db.entries_by_sheet(current_sheet, None, None)?;
let entries = entries_or_warning(entries, &streams.db)?.0;
let mut uniques = HashMap::new();
struct GroupedEntry {
@ -76,9 +78,7 @@ where
// From all possible entries belonging to this sheet keep only those with a
// note
let entries_with_notes = entries
// Iterate all entries
.into_iter()
// preserve only those with a text note
.filter_map(|e| e.note.map(|n| GroupedEntry {
note: n,
last_start: e.start,