How to change system date/time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear All,

Now, I would like to write a small program to synchronize the system clock
(data/time) of my PPC 2003 to the UTC time via Web service. My questions are
that how to change the system data/time using C# and where can I find such
Web service that returns UTC time? Thanks in advance.
 
There is an API function SetSystemTime which allows you to set the UTC time
for the system. This uses a SystemTime structure which is different to the
DateTime type in .NET. This is wrapped in the SDF (www.opennetcf.org/sdf/)
in the DateTimeEx and SystemTime types.
For retrieving the time you would probably be better placed to make a simple
NTP request (Network Time Protocol www.ntp.org) rather than have the
overhead of a web service. However there are some details here on a
webservice that does the equivalent of NTP.
http://weblogs.asp.net/jgalloway/archive/2004/04/08/110029.aspx

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
 
Back
Top