From b8f9b2eb8ea730d36a7d5ff04506b983b3cfb375 Mon Sep 17 00:00:00 2001 From: Gerrit Holl Date: Fri, 22 Nov 2024 15:48:26 +0100 Subject: [PATCH] Use UTC times, not Berlin times --- .pre-commit-config.yaml | 1 - satpy/tests/behave/features/steps/image_comparison.py | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0eb6d01c3..fe36218d40 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,6 @@ repos: - types-setuptools - types-PyYAML - types-requests - - types-pytz args: ["--python-version", "3.10", "--ignore-missing-imports"] - repo: https://github.com/pycqa/isort rev: 5.13.2 diff --git a/satpy/tests/behave/features/steps/image_comparison.py b/satpy/tests/behave/features/steps/image_comparison.py index 170f7af83e..af8b93b7c9 100644 --- a/satpy/tests/behave/features/steps/image_comparison.py +++ b/satpy/tests/behave/features/steps/image_comparison.py @@ -23,7 +23,6 @@ import cv2 import dask import numpy as np -import pytz from behave import given, then, when from satpy import Scene @@ -33,8 +32,8 @@ def before_all(context): """Define a before_all hook to create the timestamp and test results directory.""" - berlin_time = datetime.now(pytz.timezone("Europe/Berlin")) - context.timestamp = berlin_time.strftime("%Y-%m-%d-%H-%M-%S") + tm = datetime.now() + context.timestamp = tm.strftime("%Y-%m-%d-%H-%M-%S") context.test_results_dir = f"{ext_data_path}/test_results/image_comparison/{context.timestamp}" os.makedirs(os.path.join(context.test_results_dir, "generated"), exist_ok=True) os.makedirs(os.path.join(context.test_results_dir, "difference"), exist_ok=True)