From c530b19fbec64037b8d638bc4cc136eb5509b430 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 16 Jul 2024 17:12:00 +0100 Subject: [PATCH] REF: Update from deprecated `datetime.datetime.utcnow` method --- octue/cloud/pub_sub/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octue/cloud/pub_sub/service.py b/octue/cloud/pub_sub/service.py index 8e7175a99..e9813f280 100644 --- a/octue/cloud/pub_sub/service.py +++ b/octue/cloud/pub_sub/service.py @@ -533,7 +533,7 @@ def _emit_event( attributes.update( { "uuid": str(uuid.uuid4()), - "datetime": datetime.datetime.utcnow().isoformat(), + "datetime": datetime.datetime.now(tz=datetime.timezone.utc).isoformat(), "question_uuid": question_uuid, "parent_question_uuid": parent_question_uuid, "originator_question_uuid": originator_question_uuid,