GameExpo23/TFR/server/filters.py
Fluffy 300c80fcd5 Yeet useless tables
Yeet useless data paths in dockerfile
Add order into templates file
2023-06-22 13:19:00 +00:00

13 lines
323 B
Python

import datetime
from flask import Blueprint
blueprint = Blueprint("filters", __name__, template_folder="templates")
@blueprint.app_template_filter()
def format_result(dttm):
dttm = str(dttm).split(".")
time = datetime.timedelta(seconds=int(dttm[0]))
microtime = dttm[1][:3]
return f"{time}:{microtime}"