Convert timestamp into human-readable duration in jinja2 #1381
-
Hi team, I am trying to send the "outage duration" as part of the alert message, e.g.:
The problem is that there is no I assume I should I create an |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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. |
Beta Was this translation helpful? Give feedback.
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.