🏦 Database Change: convert created utc to datetimez for votes (#670)

This commit is contained in:
Viet Than 2023-08-02 22:16:29 -05:00 committed by GitHub
parent 53c78c4536
commit 15f387f109
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 60 additions and 7 deletions

View file

@ -55,7 +55,7 @@ def support(v):
def participation_stats(v):
day = int(time.time()) - 86400
week = int(time.time()) - 604800
week = int(time.time()) - 604800 # TODO themotte#601 use created_datetimez once all is converted
posters = g.db.query(Submission.author_id).distinct(Submission.author_id).filter(Submission.created_utc > week).all()
commenters = g.db.query(Comment.author_id).distinct(Comment.author_id).filter(Comment.created_utc > week).all()
voters = g.db.query(Vote.user_id).distinct(Vote.user_id).filter(Vote.created_utc > week).all()