ToastFreeware
/
chrisu
/
seepark.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b21e3c
)
resolution in consolidated mode: use <= for time intervals
author
gregor herrmann
<gregor@toastfreeware.priv.at>
Sun, 5 Aug 2018 17:10:50 +0000
(19:10 +0200)
committer
gregor herrmann
<gregor@toastfreeware.priv.at>
Sun, 5 Aug 2018 17:10:50 +0000
(19:10 +0200)
web/seepark_web.py
patch
|
blob
|
history
diff --git
a/web/seepark_web.py
b/web/seepark_web.py
index bb597324065e5ae81cd3ed65fbf75e8c297aeacb..523e52deead8d31914190d8c9ad234ece18eb8ca 100644
(file)
--- a/
web/seepark_web.py
+++ b/
web/seepark_web.py
@@
-85,11
+85,11
@@
def select_sensordata(sensor_id, sensor_type, begin, end, mode):
)
duration = (end - begin).total_seconds()
day = 60 * 60 * 24
- if duration < day:
+ if duration <
=
day:
resolution = resolutions['day']
- elif duration < 7 * day:
+ elif duration <
=
7 * day:
resolution = resolutions['week']
- elif duration < 31 * day:
+ elif duration <
=
31 * day:
resolution = resolutions['month']
else:
resolution = resolutions['year']