Skip to content

Commit

Permalink
FIX: Updates datetime.utcnow to .now using timezone object. (#1556)
Browse files Browse the repository at this point in the history
  • Loading branch information
zssherman authored Apr 11, 2024
1 parent 50df800 commit c3aa2ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyart/io/mdv_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ def write_grid_mdv(filename, grid, mdv_field_names=None, field_write_order=None)
d["max_nx"] = nx
d["max_ny"] = ny
d["max_nz"] = nz
td = datetime.datetime.utcnow() - datetime.datetime(1970, 1, 1, 0, 0)
td = datetime.datetime.now(datetime.timezone.utc) - datetime.datetime(
1970, 1, 1, 0, 0
)
d["time_written"] = int(
round(td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
)
Expand Down

0 comments on commit c3aa2ae

Please sign in to comment.