Penta 1 місяць тому
батько
коміт
e608578fb4
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      myanimebot/commands.py

+ 1 - 1
myanimebot/commands.py

@@ -220,7 +220,7 @@ async def info_cmd(message, words):
 async def ping_cmd(message, channel):
     ''' Responds to ping command '''
     messageTimestamp = message.created_at
-    currentTimestamp = datetime.datetime.utcnow()
+    currentTimestamp = datetime.datetime.now(datetime.timezone.utc)
     delta = round((currentTimestamp - messageTimestamp).total_seconds() * 1000)
 
     await message.reply("pong ({}ms)".format(delta))