Skip to content

Commit ff33f27

Browse files
committed
FIX to remove deprecated utcfromtimestamp
1 parent 6b82955 commit ff33f27

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pyart/aux_io/odim_h5.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,9 @@ def read_odim_grid_h5(
542542
if "what" in hfile[dset] and "product" in hfile[dset]["what"].attrs:
543543
field_dic["product"] = hfile[dset]["what"].attrs["product"]
544544
if odim_object == "CVOL": # add height info
545-
field_dic["product"] += f"_{hfile[dset]['what'].attrs['prodpar']:f}".encode()
545+
field_dic[
546+
"product"
547+
] += f"_{hfile[dset]['what'].attrs['prodpar']:f}".encode()
546548
field_dic["product"] = np.bytes_(field_dic["product"])
547549

548550
fields[field_name] = field_dic
@@ -959,7 +961,7 @@ def read_odim_h5(
959961
0, delta_seconds, rays
960962
)
961963
start_epoch = t_data.min()
962-
start_time = datetime.datetime.timezone.utcfromtimestamp(start_epoch)
964+
start_time = datetime.datetime.fromtimestamp(start_epoch)
963965
_time["units"] = make_time_unit_str(start_time)
964966
_time["data"] = (t_data - start_epoch).astype(float)
965967

0 commit comments

Comments
 (0)