From b6dbe874d1bfbb158a78ebb50b56698399da1878 Mon Sep 17 00:00:00 2001 From: Christian Quest Date: Mon, 30 May 2016 07:42:40 +0200 Subject: [PATCH] when=now search added --- backend.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend.py b/backend.py index 0e9b11a..765f7c7 100644 --- a/backend.py +++ b/backend.py @@ -124,6 +124,8 @@ class EventResource(BaseEvent): if 'when' in req.params: # limit search with fixed time when = req.params['when'] + if when == 'NOW': + event_when = "tstzrange(now(),now(),'[]')" if when == 'TODAY': event_when = "tstzrange(CURRENT_DATE,CURRENT_DATE + INTERVAL '1 DAY','[]')" elif when == 'TOMORROW':