LHPControl
LHPControl copied to clipboard
Auto time synchronization
Sometimes the system clock does not synchronize correctly which can cause the following Binance API error:
{"code":-1021,"msg":"Timestamp for this request was 1000ms ahead of the server's time."}
I solved this issue with a small PowerShell script which will sync the time hourly:
$timeService = Get-Service -Name W32Time
if($timeService.StartType -eq "Disabled") {
Set-Service W32Time -StartupType Manual
}
if($timeService.Status -eq "Running") {
net stop W32Time
}
net start W32Time
w32tm /config /manualpeerlist:"0.ch.pool.ntp.org" /syncfromflags:manual /reliable:yes /update
while($true) {
w32tm /resync
Start-Sleep -Seconds 3600
}
Is it possible to integrate this fix in the next release of LHPControl?
Thanks!
Thank you! I will look into adding this function.