Synchronize Windows Time from a timeapi over HTTP. Useful when NTP traffic is blocked and builtin Windows time sync can't be used.
nimble install winim
nim -d:ssl -d:release --opt:size compile timetool.nim
When not using httpclient
, ssl
support can be omitted
nim -d:release --opt:size compile timetool.nim
The second version uses NTP to fetch the current time and is more accurate than using a REST API over HTTP.
nim -d:release -d:strip --opt:size c timetool_v2.nim
For cross-compiling from Linux, specify -d:mingw
Running the executable as Administrator is necessary to set the system clock on Windows.