Fix remaining datetime.now calls
This commit is contained in:
parent
f28646c6e6
commit
427f4a9cf9
2 changed files with 3 additions and 3 deletions
|
@ -114,7 +114,7 @@ class Jarvis(Snake):
|
||||||
guild = await self.fetch_guild(DEFAULT_GUILD)
|
guild = await self.fetch_guild(DEFAULT_GUILD)
|
||||||
channel = await guild.fetch_channel(DEFAULT_ERROR_CHANNEL)
|
channel = await guild.fetch_channel(DEFAULT_ERROR_CHANNEL)
|
||||||
error_time = datetime.now(tz=timezone.utc).strftime("%d-%m-%Y %H:%M-%S.%f UTC")
|
error_time = datetime.now(tz=timezone.utc).strftime("%d-%m-%Y %H:%M-%S.%f UTC")
|
||||||
timestamp = int(datetime.now().timestamp())
|
timestamp = int(datetime.now(tz=timezone.utc).timestamp())
|
||||||
timestamp = f"<t:{timestamp}:T>"
|
timestamp = f"<t:{timestamp}:T>"
|
||||||
arg_str = ""
|
arg_str = ""
|
||||||
if ctx.target_id:
|
if ctx.target_id:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
"""J.A.R.V.I.S. Utility Functions."""
|
"""J.A.R.V.I.S. Utility Functions."""
|
||||||
from datetime import datetime
|
from datetime import datetime, timezone
|
||||||
from pkgutil import iter_modules
|
from pkgutil import iter_modules
|
||||||
|
|
||||||
import git
|
import git
|
||||||
|
@ -23,7 +23,7 @@ def build_embed(
|
||||||
) -> Embed:
|
) -> Embed:
|
||||||
"""Embed builder utility function."""
|
"""Embed builder utility function."""
|
||||||
if not timestamp:
|
if not timestamp:
|
||||||
timestamp = datetime.now()
|
timestamp = datetime.now(tz=timezone.utc)
|
||||||
embed = Embed(
|
embed = Embed(
|
||||||
title=title,
|
title=title,
|
||||||
description=description,
|
description=description,
|
||||||
|
|
Loading…
Add table
Reference in a new issue