Skip to content

Commit 6ac5afe

Browse files
committed
Fix deprecated datetime function.
1 parent 061c063 commit 6ac5afe

File tree

1 file changed

+2
-2
lines changed
  • addons/source-python/packages/source-python/core/command

1 file changed

+2
-2
lines changed

addons/source-python/packages/source-python/core/command/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# =============================================================================
88
# Python Imports
99
# Datetime
10-
from datetime import datetime
10+
from datetime import datetime, UTC
1111
# Platform
1212
import platform
1313

@@ -133,7 +133,7 @@ def _sp_help(command_info, command=None, *server_sub_commands):
133133
@core_command.server_sub_command(['info'])
134134
def print_info(info):
135135
"""Print information about OS, SP and installed plugins."""
136-
result = '\nDate : {}'.format(datetime.utcnow())
136+
result = '\nDate : {}'.format(datetime.now(UTC))
137137
result += '\nOS : {}'.format(platform.platform())
138138
result += '\nGame : {}'.format(SOURCE_ENGINE_BRANCH)
139139
result += '\nSP version : {}'.format(VERSION)

0 commit comments

Comments
 (0)