mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-06-13 17:54:44 +02:00
fix: replace datetime.UTC with timezone.utc for Python 3.10 compat
datetime.UTC was introduced in Python 3.11. timezone.utc is available since Python 3.2 and is functionally identical. Co-Authored-By: Zindello <josh@zindello.com.au>
This commit is contained in:
@@ -2,13 +2,7 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
try:
|
||||
from datetime import UTC
|
||||
except ImportError:
|
||||
from datetime import timezone
|
||||
UTC = timezone.utc
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from typing import Callable, Optional
|
||||
|
||||
@@ -5256,7 +5250,7 @@ class APIEndpoints:
|
||||
exported = _sanitize(exported)
|
||||
|
||||
meta = {
|
||||
"exported_at": datetime.now(UTC).isoformat().replace("+00:00", "Z"),
|
||||
"exported_at": datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
|
||||
"version": __version__,
|
||||
"config_path": self._config_path,
|
||||
"includes_secrets": full_backup,
|
||||
|
||||
Reference in New Issue
Block a user