The bot is currently working under 3.10, need to check out 3.9 next. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
10 lines
209 B
Python
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)
|