]> rtime.felk.cvut.cz Git - coffee/coffee-flask.git/commit
Fix incorrect counting of coffees made during time close to midnight
authorJaroslav Klapalek <klapajar@fel.cvut.cz>
Fri, 14 Sep 2018 09:39:53 +0000 (11:39 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Fri, 14 Sep 2018 12:27:46 +0000 (14:27 +0200)
commitc5cd0e6a074a4674b7fc299b2f91a0bf42065aa8
treeabe15e05620e8c70a2c315a831235d986e829aa4
parente21678bdd78e26ef9586ebbd641cb39239d74d8f
Fix incorrect counting of coffees made during time close to midnight

Datetime in database is stored in UTC timezone. Currently we are in
UTC +2 timezone (GMT +1). Because of time shifts fixing the time
cannot be done in a static way.

Dynamic solution is using paramater 'localtime' in SQL query function
date(). Therefore it is required for the target device to have
properly set timezone.

TODO:
Suggested solution is to use 'type converters' for python/sqlite3.
coffee_db.py