Igor Popov
08/18/2023, 1:00 PMLast polled: {{ work_queue.last_polled }}
The work_queue.last_polled
value is in UTC.
However, I learned that Jinja2 does not provide direct datetime arithmetic or timezone operations as a built-in. Here’s a summary of what I gathered:
1. Jinja2 doesn’t have built-in filters to manage datetime arithmetic or timezone operations.
2. Normally, such operations are handled in the application logic before the data is passed to the template.
3. If working with string representations, doing string manipulations for timezones would be hacky and error-prone.
Given these constraints, I’m looking for advice on the best way to approach this problem. Has anyone found a workaround to handle timezones within Jinja2 templates, especially without adding custom Python code?
Any advice or suggestions would be greatly appreciated!
Thanks in advance!