diff --git a/.tsk/index b/.tsk/index index 35b48fc..10418e2 100644 --- a/.tsk/index +++ b/.tsk/index @@ -1,10 +1,10 @@ -tsk-10 foreign workspaces -tsk-21 Add command to setup git stuff -tsk-8 IMAP4-based sync -tsk-17 Add reopen command -tsk-16 Add ability to search archived tasks with find command -tsk-15 Add link identification to tasks -tsk-9 fix timestamp storage and parsing -tsk-7 allow for creating tasks that don't go to top of stack -tsk-13 user-defined labels -tsk-18 Add reindex command +tsk-21 Add command to setup git stuff 1732399520 +tsk-8 IMAP4-based sync 1728535307 +tsk-17 Add reopen command 1731441422 +tsk-16 Add ability to search archived tasks with find command 1731441422 +tsk-15 Add link identification to tasks 1731441422 +tsk-9 fix timestamp storage and parsing 1728534908 +tsk-10 foreign workspaces 1728534609 +tsk-7 allow for creating tasks that don't go to top of stack 1728426156 +tsk-13 user-defined labels 1728759002 +tsk-18 Add reindex command 1731441422 diff --git a/src/errors.rs b/src/errors.rs index 622ef80..126fcb1 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -27,6 +27,8 @@ pub enum Error { #[allow(dead_code)] #[error("An unexpected error occurred: {0}")] Oops(Box), + #[error("System time/clock error: {0}")] + SystemTime(#[from] std::time::SystemTimeError), } impl From for Error { diff --git a/src/stack.rs b/src/stack.rs index cfc10b7..2cb01e9 100644 --- a/src/stack.rs +++ b/src/stack.rs @@ -142,7 +142,8 @@ impl TaskStack { self.file.seek(std::io::SeekFrom::Start(0))?; self.file.set_len(0)?; for item in self.all.iter() { - self.file.write_all(format!("{item}\n").as_bytes())?; + let time = item.modify_time.duration_since(UNIX_EPOCH)?.as_secs(); + self.file.write_all(format!("{item}\t{}\n", time).as_bytes())?; } Ok(()) }