diff --git a/clustertool/pkg/helper/time.go b/clustertool/pkg/helper/time.go index 2fbcde0e1180..17168e9d343c 100644 --- a/clustertool/pkg/helper/time.go +++ b/clustertool/pkg/helper/time.go @@ -12,9 +12,7 @@ import ( // checkSystemTime compares the system time with an NTP server time and returns whether it's correct within the given threshold func CheckSystemTime() bool { log.Info().Msg("Checking if System Time is correct...") - threshold := 5 * time.Second - // Get the current system time - systemTime := time.Now() + threshold := 10 * time.Second // Get the time from an NTP server ntpTime, err := ntp.Time("pool.ntp.org") @@ -23,6 +21,9 @@ func CheckSystemTime() bool { return true } + // Get the current system time + systemTime := time.Now() + // Calculate the difference between system time and NTP time timeDifference := systemTime.Sub(ntpTime)