from datetime import datetime, timezone def reformat_pixiv_date(date_str: str) -> datetime: rindex = date_str.rfind(':') date_str = date_str[:rindex] + date_str[rindex + 1:] return datetime.strptime(date_str, "%Y-%m-%dT%H:%M:%S%z") def get_current_utc_time() -> datetime: return datetime.now(timezone.utc)