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>
This commit is contained in:
9
discord_markov/util.py
Normal file
9
discord_markov/util.py
Normal file
@@ -0,0 +1,9 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user