Function 'coffee_flavors' wasn't doing what it was supposed to do.
Upper bound was shifted by a day (so for a week graph it was count-
ing 8 days) and also it didn't take into account 'start' variable.
variables = list()
if days is not None and days != 0:
- query += " where date(time) between date('now', 'localtime', '-"+ str(days) +" days') and date('now', 'localtime', '-"+ str(start) +" days')"
+ query += " where date(time) between date('now', 'localtime', '-"+ str(days+start-1) +" days') and date('now', 'localtime', '-"+ str(start) +" days')"
if uid is not None:
query += " and id = ?"