From dc095da6b30277aa22469320ffc26fcdb6538ff1 Mon Sep 17 00:00:00 2001 From: grydz Date: Fri, 27 Dec 2024 12:30:54 +0400 Subject: [PATCH] Fix: replace deprecated utcfromtimestamp() with fromtimestamp() --- src/cenclave_lib_sgx/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cenclave_lib_sgx/cli.py b/src/cenclave_lib_sgx/cli.py index 87369be..3158f91 100644 --- a/src/cenclave_lib_sgx/cli.py +++ b/src/cenclave_lib_sgx/cli.py @@ -9,7 +9,7 @@ import sys import sysconfig import uuid -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone from enum import Enum from pathlib import Path from typing import cast @@ -173,7 +173,7 @@ def run() -> None: else: # The conf server and the app server will use the same self-signed cert ssl_app_mode = SslAppMode.RATLS_CERTIFICATE - expiration_date = datetime.utcfromtimestamp(args.ratls) + expiration_date = datetime.fromtimestamp(args.ratls, tz=timezone.utc) logging.info("Generating self-signed certificate...")