use filter for ccpo approval log timestamp
This commit is contained in:
parent
570d3b69f3
commit
81bf0181e2
@ -65,9 +65,9 @@ def renderList(value):
|
|||||||
return app.jinja_env.filters["safe"]("<br>".join(value))
|
return app.jinja_env.filters["safe"]("<br>".join(value))
|
||||||
|
|
||||||
|
|
||||||
def formattedDate(value):
|
def formattedDate(value, formatter="%m/%d/%Y"):
|
||||||
if value:
|
if value:
|
||||||
return value.strftime("%m/%d/%Y")
|
return value.strftime(formatter)
|
||||||
else:
|
else:
|
||||||
return "-"
|
return "-"
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% set timestamp=status.time_created.strftime("%Y-%m-%d %H:%M:%S %Z") %}
|
{% set timestamp=status.time_created | formattedDate("%Y-%m-%d %H:%M:%S %Z") %}
|
||||||
<footer class='approval-log__log-item__timestamp'><time datetime='{{ timestamp }}'>{{ timestamp }}</time></footer>
|
<footer class='approval-log__log-item__timestamp'><time datetime='{{ timestamp }}'>{{ timestamp }}</time></footer>
|
||||||
</article>
|
</article>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user