gear-orders/util.py

19 lines
374 B
Python
Raw Normal View History

2025-11-14 04:03:20 +00:00
import aiohttp
2025-11-14 04:03:20 +00:00
import pytz
import datetime
from settings import TIMEZONE, ORDER_TIME
2025-11-14 04:03:20 +00:00
def make_session():
return aiohttp.ClientSession()
2025-11-14 04:03:20 +00:00
def order_time():
tz = pytz.timezone(TIMEZONE)
order_time_arr = list(map(int, ORDER_TIME.split(':')))
return datetime.time(
hour=order_time_arr[0],
minute=order_time_arr[1],
tzinfo=tz
)