diff --git a/agent-go/executor/BaseFunction.go b/agent-go/executor/BaseFunction.go index 75bdee0..1cbf5fb 100644 --- a/agent-go/executor/BaseFunction.go +++ b/agent-go/executor/BaseFunction.go @@ -1922,6 +1922,20 @@ func (op *AgentOsOperator) chronyToMasterExec(args []string) (bool, []string) { ntpFile, }) + // set time zone and ntp + AllCompleteExecutor([][]string{ + { + "timedatectl", + "set-timezone", + "Asia/Shanghai", + }, + { + "timedatectl", + "set-ntp", + "true", + }, + }) + BasicPrettyPrint(AllCompleteExecutor([][]string{ { "systemctl",