From d2d499cb64630021598795d37b9e2bd178ceceef Mon Sep 17 00:00:00 2001 From: Nemo Date: Sat, 30 Mar 2024 17:39:56 +0530 Subject: [PATCH] fix zomato dt --- src/zomato.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/zomato.py b/src/zomato.py index 6ac7ddbe..62a82f95 100644 --- a/src/zomato.py +++ b/src/zomato.py @@ -52,13 +52,11 @@ def get_event_details(event_id, zomaland = False): def parse_datetime(dt): tz = datetime.timezone(datetime.timedelta(hours=5, minutes=30)) # Asia/Kolkata timezone - print(dt) (start,end) = dt.split("-") r_start = None - print(start) for d in list(datefinder.find_dates(start)): days = (d - datetime.datetime.now()).days - if days > 0 and days < 90: + if days >= 0 and days < 90: r_start = d break for dd in list(datefinder.find_dates(end, base_date = r_start)): @@ -66,7 +64,7 @@ def parse_datetime(dt): break if r_start == None: - return None + return (None,None) # Move end by 1 day if r_end < r_start: