Skip to content

Commit

Permalink
Fix timestamp depreciation warning (again) (JCSDA-internal#202)
Browse files Browse the repository at this point in the history
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 JCSDA-internal#201
  • Loading branch information
EdwardSafford-NOAA authored Aug 1, 2024
1 parent 101d0d7 commit 2dc91b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/eva/data/csv_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

0 comments on commit 2dc91b0

Please sign in to comment.