mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
move days_ago to utils and make it tz aware
it's used in a few places - it should definitely know what timezones are and return datetimes rather than dates, which are hard to work with in terms of figuring out how tz aware they are.
This commit is contained in:
@@ -28,8 +28,3 @@ class DAOClass(object):
|
||||
db.session.delete(inst)
|
||||
if _commit:
|
||||
db.session.commit()
|
||||
|
||||
|
||||
def days_ago(number_of_days):
|
||||
from datetime import date, timedelta
|
||||
return date.today() - timedelta(days=number_of_days)
|
||||
|
||||
Reference in New Issue
Block a user