Skip to content

Commit 754b06f

Browse files
Migrate to modern datetime API
Signed-off-by: Emmanuel Ferdman <[email protected]>
1 parent 414482f commit 754b06f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ci/cpu-usage-over-time.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def idle_since(self, prev):
170170
while True:
171171
time.sleep(1)
172172
next_state = State()
173-
now = datetime.datetime.utcnow().isoformat()
173+
now = datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None).isoformat()
174174
idle = next_state.idle_since(cur_state)
175175
print("%s,%s" % (now, idle))
176176
sys.stdout.flush()

0 commit comments

Comments
 (0)