gear-orders/util.py

19 lines
396 B
Python

import aiohttp
import pytz
import datetime
from settings import TIMEZONE, ORDER_TIME
def make_session():
return aiohttp.ClientSession()
def timezone():
return pytz.timezone(TIMEZONE)
def order_time(str):
order_time_arr = list(map(int, str.split(':')))
return datetime.time(
hour=order_time_arr[0],
minute=order_time_arr[1],
tzinfo=timezone()
)