From f5d0779624ccfd4f55885e6e0fa09f2ea0ea90fc Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 24 Jul 2018 19:31:33 +0200 Subject: [PATCH] whelp --- telegrambot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/telegrambot.py b/telegrambot.py index bac395d9..575dca9d 100644 --- a/telegrambot.py +++ b/telegrambot.py @@ -466,7 +466,11 @@ def parse_timestring(timestring: str) -> typing.Union[datetime.timedelta, dateti now = datetime.datetime.now() if len(split_date) == 5: # yyyy-mm-dd-hh-mm - return datetime.datetime(*split_date) + return datetime.datetime(year=int(split_date[0]), + month=int(split_date[1]), + day=int(split_date[2]), + hour=int(split_date[3]), + minute=int(split_date[4])) elif len(split_date) == 4: return now.replace(month=int(split_date[0]), day=int(split_date[1]),