How do I set the system time

  • Thread starter Thread starter Boris Stoicov
  • Start date Start date
B

Boris Stoicov

Hi,


I am writing .NET CF application that will run on PPC and HPC devices.
I want to set the system time of the device according to GPS time that I
get.
How can i programmatically set the time of the device from my application.
I also want to turn off the device programmatically from the application but
I don't know what API I should call.
Any help will be appreciated. Thank you in advance.
 
The API is SetSystemTime - it expects the date/time as a SYSTEMTIME struct.
You can use the DateTimeEx class in the SDF which wraps this (or if you
prefer just borrow that particular piece of source code)
www.opennetcf.org/sdf (source: http://vault.netcf.tv username: guest
password: guest)

Peter
 
Back
Top