TimeService.SetTimeZoneOffset(-4*60);
TimeService.Settings.PrimaryServer = new byte[] {132,246,168,148};
TimeService.Start();
TimeService.UpdateNow(10000);
Is this the correct way of using the TimeService?
update (need to provide a settings object):
TimeServiceSettings settings = new TimeServiceSettings();
settings.PrimaryServer = new byte[] { 132, 246, 168, 148 };
TimeService.Settings = settings;
TimeService.Start();
TimeService.UpdateNow(10000);
your usage is correct, but the device might not be able to find a proxy to
get to the time server. Your desktop instead knows how to. Try connecting to
the time server with a socket to see if you can reach it. Or try changing
the DNS / DHCP properties to get a gateway that can dierct you better. In
the past it worked for me to set the gateway address as the proxy of your LAN.
Regards
Lorenzo
I think at start-up, the TimeServiceSettings object is null and just setting
the PrimaryServer property results in null as well. Once a proper instance
of TimerServiceSettings is added to the TimerService it works like a clock ;)
(booo! pun)
Regards,
Armand