From 7d56fe105f8dc39a1b4e8e6e32c202ff1f1c9111 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Mon, 23 Nov 2020 07:23:58 -0600 Subject: [PATCH] use localtime in group by --- frigate/http.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frigate/http.py b/frigate/http.py index 37122f337..43fa17883 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -18,7 +18,7 @@ bp = Blueprint('frigate', __name__) def create_app(frigate_config, database: SqliteDatabase, camera_metrics, detectors, detected_frames_processor): app = Flask(__name__) log = logging.getLogger('werkzeug') - log.setLevel(logging.ERROR) + log.setLevel(logging.INFO) @app.before_request def _db_connect(): @@ -49,13 +49,13 @@ def events_summary(): .select( Event.camera, Event.label, - fn.strftime('%Y-%m-%d', fn.datetime(Event.start_time, 'unixepoch')).alias('day'), + fn.strftime('%Y-%m-%d', fn.datetime(Event.start_time, 'unixepoch', 'localtime')).alias('day'), fn.COUNT(Event.id).alias('count') ) .group_by( Event.camera, Event.label, - fn.strftime('%Y-%m-%d', fn.datetime(Event.start_time, 'unixepoch')) + fn.strftime('%Y-%m-%d', fn.datetime(Event.start_time, 'unixepoch', 'localtime')) ) )