Skip to content

payjoin-cli history: display human-readable timestamp instead of raw unix seconds #1472

@codaMW

Description

@codaMW

Which crate is this feature request for?

No response

Please describe the feature you'd like to see added.

The history command displays session completion times as raw unix
seconds. In payjoin-cli/src/app/v2/mod.rs line 130 there is an
existing TODO comment confirming this is unfinished:

match self.completed_at {
    None => "Not Completed".to_string(),
    Some(secs) => {
        // TODO: human readable time
        secs.to_string()
    }
}

A completed session would display like:
abc123 Sender 1744123456 Session success

instead of something readable like:
abc123 Sender 2026-04-08 14:32:01 UTC Session success

Is your feature related to a problem, if so please describe it.

In payjoin-cli/src/app/v2/mod.rs line 130, there is an existing
TODO comment acknowledging this:

// TODO: human readable time
secs.to_string()

Raw unix timestamps are unreadable to operators monitoring session history.

Describe the solution you'd like

Format the unix timestamp into a readable UTC datetime string.
Question: should this use an existing crate like humantime or chrono,
or is a std-only solution preferred to avoid new dependencies?

Describe any alternatives you've considered

No response

Please leave any additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions