mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-03 23:51:22 -04:00
util for naive dt parsing
This commit is contained in:
@@ -18,3 +18,7 @@ def is_less_than_days_ago(date_from_db, number_of_days):
|
||||
return (
|
||||
datetime.utcnow().astimezone(pytz.utc) - parser.parse(date_from_db)
|
||||
).days < number_of_days
|
||||
|
||||
|
||||
def parse_naive_dt(dt):
|
||||
return parser.parse(dt, ignoretz=True)
|
||||
|
||||
Reference in New Issue
Block a user