plugins/mod_storage_sql.lua
changeset 12727 4cfd09343947
parent 12635 9524bb7f3944
child 12828 735bf601b78d
--- a/plugins/mod_storage_sql.lua	Sun Sep 04 10:01:57 2022 +0100
+++ b/plugins/mod_storage_sql.lua	Wed Sep 07 12:27:12 2022 +0200
@@ -355,12 +355,12 @@
 local function archive_where(query, args, where)
 	-- Time range, inclusive
 	if query.start then
-		args[#args+1] = query.start
+		args[#args+1] = math.floor(query.start);
 		where[#where+1] = "\"when\" >= ?"
 	end
 
 	if query["end"] then
-		args[#args+1] = query["end"];
+		args[#args+1] = math.floor(query["end"]);
 		if query.start then
 			where[#where] = "\"when\" BETWEEN ? AND ?" -- is this inclusive?
 		else