Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: aging_since should be formatted using format_timestamp_seconds, not format_duration_seconds. #256

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

daniel-wong-dfinity-org
Copy link
Contributor

@daniel-wong-dfinity-org daniel-wong-dfinity-org commented Jan 29, 2025

This is just something that I randomly noticed while using the tool. What I saw:

Aging since: 52 years, 7 months, 6 days, 15 hours, 30 minutes, 33 seconds

Since the IC did not exist 52 years ago, something was very apparently wrong.

This is a correct change, because the field aging_since_timestamp_seconds (as the name indicates) holds a timestamp.

(Note that 52 years + 7 months after the UNIX epoch is in 2022, which is a very reasonable "aging since" value.)

Description

The title already says it all.

Closes NNS1-3307.

How Has This Been Tested?

I ran cargo test (and it worked).

I also built the tool, and ran it like I did before, and reported age of the neuron makes more sense now. (BTW, I struggled to get the --hsm flag to work. Would be nice if the README had more guidance on this, but I'm not sure what it should say; I just hacked until it worked.)

Checklist

  • I have made corresponding changes to the documentation in docs/cli-reference. No need, because the way that users operate the tool is the unchanged.

  • I have added corresponding integration tests. This does not add any new functionality; just fixes a tiny formatting bug.

@daniel-wong-dfinity-org daniel-wong-dfinity-org requested a review from a team as a code owner January 29, 2025 15:46
@adamspofford-dfinity adamspofford-dfinity merged commit 0d0fd18 into master Jan 29, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants