From c61f7e70c2581cc913c10fe89639ea33ac8b79bc Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 13 May 2020 08:53:40 +0100 Subject: [PATCH] Add comments to explain time intervals --- app/dao/uploads_dao.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/dao/uploads_dao.py b/app/dao/uploads_dao.py index 994acbbcc..684fd1d57 100644 --- a/app/dao/uploads_dao.py +++ b/app/dao/uploads_dao.py @@ -14,6 +14,8 @@ def _get_printing_day(created_at): return func.date_trunc( 'day', func.timezone('Europe/London', func.timezone('UTC', created_at)) + text( + # We add 6 hours 30 minutes to the local created_at time so that + # any letters created after 5:30pm get shifted into the next day "interval '6 hours 30 minutes'" ) ) @@ -21,6 +23,7 @@ def _get_printing_day(created_at): def _get_printing_datetime(created_at): return _get_printing_day(created_at) + text( + # Letters are printed from 5:30pm each day "interval '17 hours 30 minutes'" )