Skip to content

Commit

Permalink
Sorted out deprecated utcnow
Browse files Browse the repository at this point in the history
  • Loading branch information
JMacalinao committed Apr 3, 2024
1 parent 021ec2f commit 0a219fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def set_time(tz: str, host: str, port: int, username: str, password: str):
camera = ONVIFCamera(host, port, username, password, transport=Transport(operation_timeout=5))
now = datetime.datetime.utcnow()
now = datetime.datetime.now(datetime.UTC)

params = camera.devicemgmt.create_type('SetSystemDateAndTime')
params.DateTimeType = 'Manual'
Expand Down

0 comments on commit 0a219fe

Please sign in to comment.