diff --git a/act/io/arm.py b/act/io/arm.py index 893bc84e28..05c9201a87 100644 --- a/act/io/arm.py +++ b/act/io/arm.py @@ -5,7 +5,6 @@ """ import copy -import datetime as dt import glob import json import re @@ -13,6 +12,7 @@ import tempfile import urllib import warnings +from datetime import datetime, timezone from os import PathLike from pathlib import Path, PosixPath @@ -766,7 +766,7 @@ def write_netcdf( except KeyError: pass - current_time = dt.datetime.utcnow().replace(microsecond=0) + current_time = datetime.now(timezone.utc).replace(microsecond=0) history_value = ( f'Written to file by ACT-{act.__version__} ' f'with write_netcdf() at {current_time} UTC' diff --git a/tests/plotting/test_timeseriesdisplay.py b/tests/plotting/test_timeseriesdisplay.py index 464dfb82f5..7b29941ef8 100644 --- a/tests/plotting/test_timeseriesdisplay.py +++ b/tests/plotting/test_timeseriesdisplay.py @@ -690,7 +690,7 @@ def test_xlim_correction_plot(): @pytest.mark.mpl_image_compare(tolerance=10) def test_plot_stripes(): ds = act.io.read_arm_netcdf(sample_files.EXAMPLE_MET_WILDCARD) - ds = ds.resample(time='1H').mean() + ds = ds.resample(time='1h').mean() print(ds) reference_period = ['2019-01-01', '2019-10-02']