Skip to content

Convert timestamp into human-readable duration in jinja2 #1381

Closed Locked Answered by jertel
thecatontheflat asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, since Jinja2 doesn't offer a built-in filter for this we have to do the time string manipulation ourselves. It seems every few months someone posts a discussion asking for help converting their timestamp into a particular format or timezone, and we've been recommending enhancements for that, as you suspected. There are likely some examples in the discussion forum.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@thecatontheflat
Comment options

Answer selected by thecatontheflat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants