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

Timestamp encoding to bytes is weird #1445

Open
vedhavyas opened this issue Oct 16, 2020 · 0 comments
Open

Timestamp encoding to bytes is weird #1445

vedhavyas opened this issue Oct 16, 2020 · 0 comments

Comments

@vedhavyas
Copy link
Contributor

ATM we encode bytes as follows

  • Seconds(8 bytes) + nanoseconds(4 bytes)

We can either remove the nanosecond completely and just encode the epoch until seconds.
If we want to nano seconds to be included, then use time.UnixNano() to fetch the uin64 and encode that to bytes.

this will break the current AssetNFTs that rely on the maturity date in the above-mentioned format.

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

No branches or pull requests

1 participant