From 24c8fcda7d24a5ab5627e07b58ce1281b5dc19b9 Mon Sep 17 00:00:00 2001 From: Alan Mitchell Date: Mon, 24 Apr 2017 09:25:24 -0800 Subject: [PATCH] Bug in conversion of time period. --- bmsapp/reports/basechart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bmsapp/reports/basechart.py b/bmsapp/reports/basechart.py index 7efd84e..ff962ee 100644 --- a/bmsapp/reports/basechart.py +++ b/bmsapp/reports/basechart.py @@ -177,7 +177,7 @@ class BaseChart(object): """ tm_per = self.request_params['time_period'] if tm_per != "custom": - st_ts = int(time.time()) - int(tm_per) * 24 * 3600 + st_ts = int(time.time()) - float(tm_per) * 24 * 3600 end_ts = time.time() + 3600.0 # adding an hour to be sure all records are caught else: st_date = self.request_params['start_date'] -- GitLab