Skip to content

Commit

Permalink
Fix import that does not work in python 3.10
Browse files Browse the repository at this point in the history
Replace UTC with timezone.utc
  • Loading branch information
JHolba committed Dec 3, 2024
1 parent 5dbaae5 commit 03ee39a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ert/ensemble_evaluator/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import typing
import warnings
from base64 import b64encode
from datetime import UTC, datetime, timedelta
from datetime import datetime, timedelta, timezone
from typing import Optional

from cryptography import x509
Expand Down Expand Up @@ -71,8 +71,8 @@ def _generate_certificate(
.issuer_name(issuer)
.public_key(key.public_key())
.serial_number(x509.random_serial_number())
.not_valid_before(datetime.now(UTC))
.not_valid_after(datetime.now(UTC) + timedelta(days=365)) # 1 year
.not_valid_before(datetime.now(timezone.utc))
.not_valid_after(datetime.now(timezone.utc) + timedelta(days=365)) # 1 year
.add_extension(
x509.SubjectAlternativeName(
[
Expand Down

0 comments on commit 03ee39a

Please sign in to comment.