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

make epoch time for mainnet more intuitive #6961

Closed
wants to merge 2 commits into from

Conversation

zlhwdsz
Copy link
Contributor

@zlhwdsz zlhwdsz commented Jul 31, 2021

No description provided.

@zlhwdsz zlhwdsz requested a review from a team as a code owner July 31, 2021 00:59
if build.BuildType == build.BuildMainnet {
start := time.Date(2020, 8, 24, 22, 0, 0, 0, time.UTC)
eTime := start.Add(time.Second * time.Duration(int64(build.BlockDelaySecs)*int64(e)))
return fmt.Sprintf("%d (%s)", e, eTime.Format("2006-01-02 15:04 MST"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zlhwdsz I think the notion of relative time is actually more intuitive than including the timestamp. I can see the timestamp helping though so I'll approve if you print both for mainnet Epoch time: (%d, %s ([now | %s ago | in %s]))

Copy link
Contributor Author

@zlhwdsz zlhwdsz Aug 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way the check-expire lines will be lengthy and hard to read:

df95d151fec0ddc5f50173edc16d5cf

I closed this PR and provide a customized epochTime function for check-expire cmd in #7101 .

@zlhwdsz zlhwdsz closed this Aug 17, 2021
@zlhwdsz zlhwdsz deleted the epoch-time branch August 17, 2021 06:28
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.

2 participants