Juan Simon .D 3 лет назад
Родитель
Сommit
b9c9791432
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      wbb/utils/functions.py

+ 2 - 2
wbb/utils/functions.py

@@ -160,7 +160,7 @@ def get_urls_from_text(text: str) -> bool:
     return [x[0] for x in findall(regex, str(text))]
 
 
-async def time_converter(message: Message, time_value: str) -> int:
+async def time_converter(message: Message, time_value: str) -> datetime:
     unit = ["m", "h", "d"]  # m == minutes | h == hours | d == days
     check_unit = "".join(list(filter(time_value[-1].lower().endswith, unit)))
     currunt_time = datetime.now()
@@ -175,7 +175,7 @@ async def time_converter(message: Message, time_value: str) -> int:
         temp_time = currunt_time + timedelta(days=int(time_digit))
     else:
         return await message.reply_text("Incorrect time specified.")
-    return int(datetime.timestamp(temp_time))
+    return temp_time
 
 
 async def extract_userid(message, text: str):