ajeetdsouza/zoxide · error · ImportError

invalid timestamp: {timestamp:?}

Error message

invalid timestamp: {timestamp:?}

What it means

Error "invalid timestamp: {timestamp:?}" thrown in ajeetdsouza/zoxide.

Source

Thrown at src/import/atuin.rs:59

    fn new(reader: BufReader<ChildStdout>, child: Child) -> Self {
        Self { reader, buf: Vec::new(), line_num: 0, child, prev_cwd: None }
    }

    fn err(&self, source: anyhow::Error) -> ImportError {
        ImportError { path: None, line_num: self.line_num, source }
    }

    fn parse_line(&self, line: &[u8]) -> Result<Dir<'static>, ImportError> {
        let line =
            str::from_utf8(line).map_err(|e| self.err(anyhow!(e).context("invalid utf-8")))?;

        let (timestamp, path) =
            line.split_once('\t').ok_or_else(|| self.err(anyhow!("invalid entry: {line}")))?;

        let timestamp_format =
            time::macros::format_description!("[year]-[month]-[day] [hour]:[minute]:[second]");
        let timestamp = time::PrimitiveDateTime::parse(timestamp, timestamp_format)
            .map_err(|e| self.err(anyhow!(e).context(format!("invalid timestamp: {timestamp:?}"))))?
            .assume_utc()
            .unix_timestamp();

        let dir = Dir {
            path: Cow::Owned(path.to_string()),
            rank: 1.0,
            last_accessed: timestamp as Epoch,
        };
        Ok(dir)
    }
}

impl Iterator for Iter {
    type Item = Result<Dir<'static>, ImportError>;

    fn next(&mut self) -> Option<Self::Item> {
        loop {
            self.buf.clear();

View on GitHub (pinned to ee594e6906)

When it happens

Trigger: Thrown at src/import/atuin.rs:59 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ajeetdsouza/zoxide@ee594e6906 (2026-08-16). Data as JSON: /api/errors/31d8490cc93c02ff. Report an issue: GitHub.