From 5c8b0c81baa63c656fc1055c2266f0456686c100 Mon Sep 17 00:00:00 2001 From: Bryann Valderrama Date: Thu, 9 May 2024 11:18:37 -0500 Subject: [PATCH] refactor: replace deprecated function --- platform_plugin_turnitin/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform_plugin_turnitin/utils.py b/platform_plugin_turnitin/utils.py index 7235a4a..2e2b1b5 100644 --- a/platform_plugin_turnitin/utils.py +++ b/platform_plugin_turnitin/utils.py @@ -1,6 +1,6 @@ """Utility functions for the Turnitin platform plugin.""" -from datetime import datetime +from datetime import datetime, timezone from opaque_keys.edx.keys import UsageKey @@ -18,7 +18,7 @@ def get_current_datetime() -> str: Returns: str: The current datetime in ISO 8601 format. """ - return datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ") + return datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") def enabled_in_course(block_id: str) -> bool: