Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20668

Re: Error when applying Server clock drift (powershell)

$
0
0

There is a bug in the Server Clock Drift (Powershell) - Clock Drift NTP component.  If you make the following changes it should work reliably, I think.

 

Starting around line 24...

=====

    If ($remoteToSolarSkew)

    {

        $Skew = $remoteToSolarSkew.TotalSeconds - $ntpToSolarSkew;

        $stat=[math]::round($Skew,2);

        #$symb=$Skew.ToString().Substring(0,1);

        $symb=$stat.ToString().Substring(0,1);

        if ($symb -eq "-")

        {

            #$stat=[math]::round($Skew,2);

            $tmp=$stat.ToString().Remove(0,1);

            Write-Host "Message: Clock drift: $stat.";

            Write-Host "Statistic: $tmp";

            exit 0;

        }

        else

        {

            $stat=[math]::round($Skew,2);

            #Write-Host "Message: Clock drift: $symb $stat s.";

            Write-Host "Message: Clock drift: $stat s.";

            Write-Host "Statistic: $stat";

            exit 0;

        }

    }

=====


Viewing all articles
Browse latest Browse all 20668

Trending Articles