feat: 完善变更服务器时间的接口2

This commit is contained in:
caoqianming 2025-05-19 10:16:49 +08:00
parent 1a1f64f9fe
commit b1487957b5
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ class ServerTime(APIView):
修改服务器时间
"""
command = f'date -s "{request.data["new_server_time"]}"'
command = f'date -s "{request.data["server_time"]}"'
completed = subprocess.run(
["sudo", "sh", "-c", command], # 避免 shell=True 的安全风险
input=SD_PWD, # 密码从安全配置读取