fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pavel_Duron 2022-11-03 19:18:31 +10:00
parent 988f5ca1e2
commit eaa37713cd

4
bot.py
View File

@ -16,12 +16,12 @@ dp = Dispatcher(bot)
@dp.message_handler(commands=["time"])
async def send_time(message: types.Message):
new_year = datetime.date(2022, 12, 31)
new_year = datetime.datetime(2022, 12, 31)
ct = datetime.datetime.now() #датавремя
cd = datetime.datetime.now().strftime("%d/%m/%Y") #дата
ct1 = ct+datetime.timedelta(hours=14) # +14 часов от сервера
ct2 = ct1.strftime('%H:%M') # форматирует датувремя просто во время
raznitsa = new_year - ct1
raznitsa = (new_year - ct).days
await message.reply(f'Сегодня {cd} \nВремя: {ct2} \nДо Нового Года осталось {raznitsa} дней(-я)')