diff --git a/IM/Stats.py b/IM/Stats.py index 1e657b4e..46138a21 100644 --- a/IM/Stats.py +++ b/IM/Stats.py @@ -114,7 +114,7 @@ def get_stats(init_date="1970-01-01", end_date=None, auth=None): if db.db_type == DataBase.MONGO: filt = InfrastructureList._gen_filter_from_auth(auth) if end_date: - filt["date"] = {"$lte": end_date} + filt["date"] = {"$lte": datetime.datetime.strptime(end_date, "%Y-%m-%d").timestamp} res = db.find("inf_list", filt, {"id": True, "data": True, "date": True}, [('id', -1)]) else: where = InfrastructureList._gen_where_from_auth(auth)