fix datetime format filter

This commit is contained in:
Lera Elvoé 2025-07-01 18:08:14 +03:00
parent 06799a5088
commit 44a475dc87
Signed by: yagich
SSH Key Fingerprint: SHA256:6xjGb6uA7lAVcULa7byPEN//rQ0wPoG+UzYVMfZnbvc

View File

@ -103,6 +103,6 @@ def create_app():
@app.template_filter("ts_datetime") @app.template_filter("ts_datetime")
def ts_datetime(ts, format): def ts_datetime(ts, format):
return datetime.utcfromtimestamp(ts).strftime(format) return datetime.utcfromtimestamp(ts or int(time.time())).strftime(format)
return app return app