Skip to content

Commit 42f8d1c

Browse files
committed
ENH: replace datetime.UTC by datetime.timezone.utc to support older python version
1 parent cb6f16d commit 42f8d1c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pyrad_proc/pyrad/io/trajectory.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,11 @@ def _read_traj(self):
351351
try:
352352
sday = datetime.datetime.strptime(mm.group(1), "%d-%b-%Y")
353353
except Exception as ee:
354-
print(datetime.datetime.now(datetime.UTC).strftime("%d-%b-%Y"))
354+
print(
355+
datetime.datetime.now(datetime.timezone.utc).strftime(
356+
"%d-%b-%Y"
357+
)
358+
)
355359
raise Exception(
356360
f"ERROR: Format error in traj file '{self.filename}' "
357361
f"on line '{line}' ({str(ee)})"

0 commit comments

Comments
 (0)