Replies: 2 comments
-
Maybe I am missing what you are saying but you can do the conversion without Rich and then Rich can print it. from datetime import datetime
from rich import print
timestamp = 1647027405
print(datetime.fromtimestamp(timestamp)) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Unix timestamps are integers, so Rich can't know they are meant to be rendered as times. Perhaps you can can give an example of what formats you want to display, and what kind of API? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I didn't see anything, but want to check this isn't already a feature.
It would be cool to provide a standard unix timestamp to rich and make it easy to print it in various formats.
If rich is sort of like the view layer I think it makes sense for it to be able to convert unix timestamps. Is this already possible?
Beta Was this translation helpful? Give feedback.
All reactions