mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
housekeep: centralize datetime generation
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
7bcc8d7ce7
commit
7f6c23d4cb
41 changed files with 146 additions and 179 deletions
|
@ -1,12 +1,10 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import and_
|
||||
|
||||
import aurweb.config
|
||||
|
||||
from aurweb import db
|
||||
from aurweb import db, time
|
||||
from aurweb.models import TUVoteInfo
|
||||
from aurweb.scripts import notify
|
||||
|
||||
|
@ -16,7 +14,7 @@ notify_cmd = aurweb.config.get('notifications', 'notify-cmd')
|
|||
def main():
|
||||
db.get_engine()
|
||||
|
||||
now = int(datetime.utcnow().timestamp())
|
||||
now = time.utcnow()
|
||||
|
||||
start = aurweb.config.getint("tuvotereminder", "range_start")
|
||||
filter_from = now + start
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue