Skip to content

Commit

Permalink
aur: datetime.utcfromtimestamp is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
lilydjwg committed May 11, 2024
1 parent 03da74f commit 62f12aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nvchecker_source/aur.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MIT licensed
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
# Copyright (c) 2013-2020,2024 lilydjwg <lilydjwg@gmail.com>, et al.

from datetime import datetime
from datetime import datetime, UTC
import asyncio
from typing import Iterable, Dict, List, Tuple, Any, Optional

Expand Down Expand Up @@ -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'], UTC)
version += '-' + dt.strftime('%Y%m%d%H%M%S')
if strip_release and '-' in version:
version = version.rsplit('-', 1)[0]

Expand Down

0 comments on commit 62f12aa

Please sign in to comment.