From 73d5dd5eabca370983f97792a5af5716a3d02053 Mon Sep 17 00:00:00 2001 From: cquest Date: Sun, 19 Jun 2016 16:30:13 +0200 Subject: [PATCH] accept + in URL for timezones --- backend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend.py b/backend.py index 8f18fc6..cddda0e 100644 --- a/backend.py +++ b/backend.py @@ -110,9 +110,10 @@ class EventResource(BaseEvent): def relative_time(self, when, cur): + when = when.upper().replace(' ','+') event_start = cur.mogrify("%s",(when,)).decode("utf-8") event_stop = cur.mogrify("%s",(when,)).decode("utf-8") - when = when.upper() + if when == 'NOW': event_start = "now()" event_stop = "now()"