-
Notifications
You must be signed in to change notification settings - Fork 117
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
Incorrect timestamp returned from view #3093
Comments
Maybe I'm missing something obvious - the timestamp in the contract storage also comes back in this same format
|
found a hacky workaround to convert this to the correct js Date:
|
@skenaja Thank you for submitting the detailed issue.
In Taquito, we currently only support Unix timestamps in seconds. This explains why your workaround works, as you are converting from milliseconds to seconds. We need to investigate why it was possible to save Unix timestamps in milliseconds to the blockchain and whether we need to support both formats in Taquito. |
thanks makes sense! BCD shows the expected timestamp, and it turns out they were supporting milliseconds https://better-call.dev/mainnet/KT1ExbCyFbsvPQTUitHAK7HSfYkJgiCtBGpM/storage/big_map/597699/keys |
Due to Ubinetic stores timestamp with milliseconds format, we should add casting to standard-like timestamp object type. Issue shown here: ecadlabs/taquito#3093
i've posted this issue in tezos-dev michelson channel for some answers to assess if it makes sense to support both in taquito. https://tezos-dev.slack.com/archives/C69RKF3PG/p1733855975614059 |
I can confirm that the |
Description
Wrong timestamp is returned from simulating onchain view of a contract. Looks like it might be a date conversion issue
Tested with v13.0.0 and v19.0.0
Steps To Reproduce
Actual behavior
Expected behavior
The text was updated successfully, but these errors were encountered: