[Coffee] [PATCH coffee-flask] Fix coffee graph for start of the month

Jaroslav Klapalek klapajar at fel.cvut.cz
Mon Sep 3 15:10:04 CEST 2018


---
 coffee_db.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/coffee_db.py b/coffee_db.py
index 0abb5a4..8c18e63 100644
--- a/coffee_db.py
+++ b/coffee_db.py
@@ -95,7 +95,7 @@ def coffee_history(uid=None):
 
     if uid is None:
         res = list(c.execute("""
-            select strftime('%d', ds.d),count(c.flavor),c.flavor from
+            select strftime('%s', ds.d),count(c.flavor),c.flavor from
             (select num,date('now',-num || ' days') as d from days) ds
             left join coffees c
             on d = date(c.time) group by d, c.flavor
@@ -103,7 +103,7 @@ def coffee_history(uid=None):
     else:
         res = list(c.execute(
             """
-            select strftime('%d', ds.d),count(c.flavor),c.flavor from
+            select strftime('%s', ds.d),count(c.flavor),c.flavor from
             (select num,date('now',-num || ' days') as d from days) ds
             left join
             (select time,flavor from coffees where id = ?) c
-- 
2.7.4




More information about the Coffee mailing list