use user timezone in /stats

pull/83/head
Aevann 2022-12-26 04:45:55 +02:00
parent cc5e195228
commit eec2992be8
2 changed files with 6 additions and 2 deletions

View File

@ -100,7 +100,7 @@ def stats(site=None):
active_users = set(posters) | set(commenters) | set(voters) | set(commentvoters)
stats = {
"time": time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(now)),
"time": int(time.time()),
"marseys": "{:,}".format(g.db.query(Marsey).filter(Marsey.submitter_id==None).count()),
"users": "{:,}".format(g.db.query(User).count()),
"private users": "{:,}".format(g.db.query(User).filter_by(is_private=True).count()),

View File

@ -11,7 +11,11 @@
{% for key, value in data.items() %}
<tr>
<td>{{key}}</td>
<td>{{value}}</td>
{% if key == 'time' -%}
<td data-time="{{value}}"></td>
{% else -%}
<td>{{value}}</td>
{%- endif %}
</tr>
{% endfor %}
</table>