Setting system date

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

How do I set the system date on CE4.2 device, preferably using vb.net?
DateString returns an error that it's not supported and the SetSystemTime
API doesn't work as well as far as I can tell. There has to be a way to do
this but I'm stumped and would very much appreciate some help. I will admit
that this is my first CE application and am more versed in VB6 than a .net
language so I may be overlooking the obvious.

Thanks,

Scott
 
SetSystemTime() absolutely *does* work, if you've wrapped it correctly for
calls from managed code. However, you might be mistaken about what it does,
since it's setting GMT, *not* the local time of the device. The timezone
offset will be applied to the value you pass to SetSystemTime(). You can
use SetLocalTime(), if that's what you want to set.

Paul T.
 
Back
Top