diff --git a/rslib/src/browser_table.rs b/rslib/src/browser_table.rs index 8270c078d..28e009e8b 100644 --- a/rslib/src/browser_table.rs +++ b/rslib/src/browser_table.rs @@ -398,7 +398,7 @@ impl RowContext { Column::Cards => self.cards_str()?, Column::NoteCreation => self.note_creation_str(), Column::SortField => self.note_field_str(), - Column::NoteMod => self.note.mtime.date_string(), + Column::NoteMod => self.note.mtime.date_and_time_string(), Column::Tags => self.note.tags.join(" "), Column::Notetype => self.notetype.name.to_owned(), Column::Custom => "".to_string(), @@ -406,7 +406,9 @@ impl RowContext { } fn note_creation_str(&self) -> String { - TimestampMillis(self.note.id.into()).as_secs().date_string() + TimestampMillis(self.note.id.into()) + .as_secs() + .date_and_time_string() } fn note_field_str(&self) -> String { @@ -515,7 +517,7 @@ impl RowContext { .map(|c| c.mtime) .max() .expect("cards missing from RowContext") - .date_string() + .date_and_time_string() } fn deck_str(&self) -> String { diff --git a/rslib/src/timestamp.rs b/rslib/src/timestamp.rs index 91bc81d1d..e0f919e47 100644 --- a/rslib/src/timestamp.rs +++ b/rslib/src/timestamp.rs @@ -53,6 +53,10 @@ impl TimestampSecs { .unwrap_or_else(|_err| "invalid date".to_string()) } + pub(crate) fn date_and_time_string(self) -> String { + format!("{} @ {}", self.date_string(), self.time_string()) + } + pub fn local_utc_offset(self) -> Result { Ok(*self.local_datetime()?.offset()) }