GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still and

Commit 3ec1a8e6 authored by juga  's avatar juga
Browse files

fix: timestamp: measurements period is in seconds

by default days is passed to timedelta, what was making the oldest
date be thousands of days in the past.
parent d7b5d3de
......@@ -90,5 +90,5 @@ def is_old(timestamp, measurements_period=MEASUREMENTS_PERIOD):
# This will raise an exception if the type is not int or float or
# is not actually a timestamp
timestamp = unixts_to_dt_obj(timestamp)
oldest_date = datetime.utcnow() - timedelta(measurements_period)
oldest_date = datetime.utcnow() - timedelta(seconds=measurements_period)
return timestamp < oldest_date
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment