mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-03 23:51:22 -04:00
Ensure test data uses timezone aware timestamps
This reflects what the API sends us, and means we have to do less timezone-wrangling.
This commit is contained in:
@@ -822,7 +822,7 @@ def format_thousands(value):
|
||||
|
||||
def is_less_than_days_ago(date_from_db, number_of_days):
|
||||
return (
|
||||
datetime.utcnow().astimezone(pytz.utc) - parser.parse(date_from_db).astimezone(pytz.utc)
|
||||
datetime.utcnow().astimezone(pytz.utc) - parser.parse(date_from_db)
|
||||
).days < number_of_days
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user