diff --git a/nvchecker_source/aur.py b/nvchecker_source/aur.py index 878834f..7f2a0d6 100644 --- a/nvchecker_source/aur.py +++ b/nvchecker_source/aur.py @@ -1,7 +1,7 @@ # MIT licensed -# Copyright (c) 2013-2020 lilydjwg , et al. +# Copyright (c) 2013-2020,2024 lilydjwg , et al. -from datetime import datetime +from datetime import datetime, timezone import asyncio from typing import Iterable, Dict, List, Tuple, Any, Optional @@ -95,7 +95,8 @@ async def _run_batch_impl( version = result['Version'] if use_last_modified: - version += '-' + datetime.utcfromtimestamp(result['LastModified']).strftime('%Y%m%d%H%M%S') + dt = datetime.fromtimestamp(result['LastModified'], timezone.utc) + version += '-' + dt.strftime('%Y%m%d%H%M%S') if strip_release and '-' in version: version = version.rsplit('-', 1)[0]