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,