From 75bf258d5291b8a6fba93f389f16f0602e901555 Mon Sep 17 00:00:00 2001 From: PoGoZbot Date: Mon, 5 Feb 2018 11:28:17 +0000 Subject: [PATCH] Fix report for single pokemon with sqlite --- monocle/db.py | 2 +- monocle/templates/report_single.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monocle/db.py b/monocle/db.py index 160de34a5..c02da9734 100644 --- a/monocle/db.py +++ b/monocle/db.py @@ -925,7 +925,7 @@ def get_all_sightings(session, pokemon_ids): def get_spawns_per_hour(session, pokemon_id): if DB_TYPE == 'sqlite': - ts_hour = 'STRFTIME("%H", expire_timestamp)' + ts_hour = 'STRFTIME("%H", datetime(expire_timestamp,"unixepoch"))' elif DB_TYPE == 'postgresql': ts_hour = "TO_CHAR(TO_TIMESTAMP(expire_timestamp), 'HH24')" else: diff --git a/monocle/templates/report_single.html b/monocle/templates/report_single.html index af374ff45..c4a76df3a 100644 --- a/monocle/templates/report_single.html +++ b/monocle/templates/report_single.html @@ -25,7 +25,7 @@ -