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

Parse timestamp to datetime #741

Closed
tsusanka opened this issue Dec 5, 2019 · 5 comments · Fixed by #1877
Closed

Parse timestamp to datetime #741

tsusanka opened this issue Dec 5, 2019 · 5 comments · Fixed by #1877
Assignees
Labels
core Trezor Core firmware. Runs on Trezor Model T and T2B1.

Comments

@tsusanka
Copy link
Contributor

tsusanka commented Dec 5, 2019

In Stellar and most likely in some other apps as well the host is sending a timestamp to Trezor. We currently do not have a function to format it into something more readable. Since we probably (?) do not want to include the whole datetime micropython library we can either:

  1. Use C and its time.h library (implemented in tsusanka/timestamp, but it fails on multiple definition of snprintf).
  2. Write it manually.
  3. Add the datetime library.
@tsusanka tsusanka added core Trezor Core firmware. Runs on Trezor Model T and T2B1. feature labels Dec 5, 2019
@tsusanka tsusanka added this to the backlog milestone Dec 5, 2019
@prusnak
Copy link
Member

prusnak commented Dec 5, 2019

We could take the relevant parts from datetime.py in case we want to go with option 3

@prusnak
Copy link
Member

prusnak commented Dec 9, 2019

Another place where we could use this function is here:

(when lock_time is interpreted as timestamp and not the blockheight).

@prusnak
Copy link
Member

prusnak commented Dec 9, 2019

@matejcik
Copy link
Contributor

for QA:

Prepare a Bitcoin or Testnet transaction in Suite.
Add a locktime.
Use e.g. https://www.epochconverter.com/ to generate a timestamp in the future, use the Epoch timestamp value as locktime.
image
Check that the locktime confirmation screen on Trezor is showing the right date & time.

The transaction does not need to be sent, this is purely a display change.

@bosomt
Copy link

bosomt commented Nov 17, 2021

QA OK

fw trezor-fw-regular-2.4.3-221977ad.bin
fw trezor-fw-regular-1.10.4-221977ad.bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Trezor Core firmware. Runs on Trezor Model T and T2B1.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants