Skip to content

Commit

Permalink
Fix datetime.datetime.utcnow()
Browse files Browse the repository at this point in the history
Update datetime since datetime.utcnow() was deprecated since Python 3.12.
  • Loading branch information
thecalamityjoe87 authored Aug 17, 2024
1 parent aa75c76 commit 03e3efa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions howdy/src/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import configparser
import dlib
import cv2
import datetime
from datetime import timezone, datetime
import atexit
import subprocess
import snapshot
Expand Down Expand Up @@ -71,7 +71,7 @@ def make_snapshot(type):
"""Generate snapshot after detection"""
snapshot.generate(snapframes, [
type + _(" LOGIN"),
_("Date: ") + datetime.datetime.utcnow().strftime("%Y/%m/%d %H:%M:%S UTC"),
_("Date: ") + datetime.now(timezone.utc).strftime("%Y/%m/%d %H:%M:%S UTC"),
_("Scan time: ") + str(round(time.time() - timings["fr"], 2)) + "s",
_("Frames: ") + str(frames) + " (" + str(round(frames / (time.time() - timings["fr"]), 2)) + "FPS)",
_("Hostname: ") + os.uname().nodename,
Expand Down

0 comments on commit 03e3efa

Please sign in to comment.