mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-10-23 08:57:55 +00:00
Silence warning about timezone in datetime object
Modern versions of Python emit a DeprecationWarning about `datetime.datetime.utcfromtimestamp()`. It didn't really matter here, but do stop using it. Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
@@ -341,7 +341,8 @@ class EntryFileSortKey:
|
||||
text = subprocess.check_output(['git', 'show', '-s',
|
||||
'--format=%ct',
|
||||
commit_id])
|
||||
return datetime.datetime.utcfromtimestamp(int(text))
|
||||
return datetime.datetime.fromtimestamp(int(text),
|
||||
datetime.timezone.utc)
|
||||
|
||||
@staticmethod
|
||||
def file_timestamp(filename):
|
||||
|
||||
Reference in New Issue
Block a user