Files
discord-markov/discord_markov/util.py
Alek Ratzloff 7f9714263d Initial commit
The bot is currently working under 3.10, need to check out 3.9 next.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-10-22 18:00:52 -07:00

10 lines
209 B
Python

from datetime import datetime, timezone
def utcnow() -> datetime:
return datetime.now(timezone.utc)
def utc_from_timestamp(timestamp: float):
return datetime.fromtimestamp(timestamp, timezone.utc)