From 2dc91b0fc591b0e604e39e6466e91480156b7508 Mon Sep 17 00:00:00 2001 From: Ed Safford <62339196+EdwardSafford-NOAA@users.noreply.github.com> Date: Thu, 1 Aug 2024 09:49:01 -0400 Subject: [PATCH] Fix timestamp depreciation warning (again) (#202) Fix timestamp deprecation warning in `csv_data.py`. This was fixed once but the file change was apparently lost during the confusion with the CI test failures. Close #201 --- src/eva/data/csv_space.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/eva/data/csv_space.py b/src/eva/data/csv_space.py index 2ed34698..b0f9016e 100644 --- a/src/eva/data/csv_space.py +++ b/src/eva/data/csv_space.py @@ -156,4 +156,6 @@ def get_datetime_array(self, file_data, date_config): " \'year\': int, \'month\': int, \'day\': int, and \'hour\': int. " + f" Date information found was {date_config}") - return np.array([np.datetime64(datetime.strptime(ds, '%Y%m%d%H')) for ds in date_str_list]) + return np.array([np.datetime64(datetime.strptime(ds, + '%Y%m%d%H').strftime('%Y-%m-%dT%H:%M:%S.%f000000'), + 'ns') for ds in date_str_list])