Skip to content

Commit

Permalink
storage: fix deprecated UTC naive syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
fepitre committed Nov 11, 2024
1 parent be663a0 commit 8ad9351
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qubes/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
import os.path
import string
import subprocess
import time
from datetime import datetime
from datetime import datetime, timezone

import asyncio
from typing import Dict, Tuple, Union
Expand Down Expand Up @@ -1013,7 +1012,9 @@ def driver_parameters(name):

def isodate(seconds):
''' Helper method which returns an iso date '''
return datetime.utcfromtimestamp(seconds).isoformat("T")
return datetime.fromtimestamp(
seconds, tz=timezone.utc
).isoformat().replace("+00:00", "")

def search_pool_containing_dir(pools, dir_path):
''' Helper function looking for a pool containing given directory.
Expand Down

0 comments on commit 8ad9351

Please sign in to comment.