changedetection.io icon indicating copy to clipboard operation
changedetection.io copied to clipboard

jinja2-time offsets not working

Open pschoenmakers opened this issue 2 years ago • 7 comments

It's not possible to use time offsets currently. I tested with this example from: https://pypi.org/project/jinja2-time/

{% now 'utc' - 'minutes=11' %}

This gives an error Invalid template syntax when trying to save a watch.

pschoenmakers avatar Mar 24 '23 09:03 pschoenmakers

Might be because of this upstream bug: https://github.com/hackebrot/jinja2-time/issues/18

pschoenmakers avatar Mar 24 '23 09:03 pschoenmakers

Super interesting, can you reproduce it somehow using the command line?

dgtlmoon avatar Mar 24 '23 16:03 dgtlmoon

I am not really sure what to test here exactly?

pschoenmakers avatar Apr 06 '23 16:04 pschoenmakers

I think the jinja2-time Project is abandoned. The last commit was in 2021... please consider here to use an alternative.

x0tester0x avatar Nov 29 '23 11:11 x0tester0x

I think the jinja2-time Project is abandoned. The last commit was in 2021... please consider here to use an alternative.

@x0tester0x and do you have an alternative? can you recommend an alternative?

dgtlmoon avatar Nov 29 '23 11:11 dgtlmoon

@dgtlmoon Arrow is an alternative, which is also already used toegether with jinja2-time (https://github.com/arrow-py/arrow) There is also https://github.com/sdispater/pendulum and https://github.com/dateutil/dateutil

x0tester0x avatar Nov 29 '23 12:11 x0tester0x

Are there any updates on replacing jinja2-time?

randshell avatar May 01 '24 18:05 randshell