use filter for ccpo approval log timestamp

This commit is contained in:
dandds 2018-09-11 09:45:15 -04:00
parent 570d3b69f3
commit 81bf0181e2
2 changed files with 3 additions and 3 deletions

View File

@ -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 "-"

View File

@ -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>