Replace usage of deprecated utcnow function

This commit is contained in:
Kovid Goyal 2024-06-24 10:06:20 +05:30
parent 20c919e16e
commit cf4630350f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -333,7 +333,7 @@ def patch(self, url: str, fail_msg: str, **data: str) -> None:
def update_nightly_description(self, release_id: int) -> None:
url = f'{self.url_base}/{release_id}'
now = str(datetime.datetime.utcnow()).split('.')[0] + ' UTC'
now = str(datetime.datetime.now(datetime.timezone.utc)).split('.')[0] + ' UTC'
commit = subprocess.check_output(['git', 'rev-parse', '--verify', '--end-of-options', 'master^{commit}']).decode('utf-8').strip()
self.patch(
url, 'Failed to update nightly release description',