feat(cli): update time synchronization check to validate stratum value

This commit is contained in:
eball
2026-03-04 14:09:40 +08:00
parent d796dee8b0
commit ba49350272

View File

@@ -1054,7 +1054,8 @@ func (t *WaitTimeSyncTask) Execute(runtime connector.Runtime) error {
return err
} else {
resToken := strings.Split(res, ",")
if strings.ToLower(resToken[len(resToken)-1]) == "normal" {
// if the stratum of the server is 10 which means the local reference (hardware RTC) is active.
if strings.ToLower(resToken[2]) != "10" { // Stratum
logger.Infof("time synchronization is normal")
return nil
}