Set Device Time With OpenNETCF Desktop Communication Library

Mar 17, 2010 at 5:44 PM

Hi all,

i am new in this site :)

anyone knows how is possible, and if is possible to set the time/date of a windows ce device using this library from a desktop software?

i am looking everywhere on the net but i still get nothing talking about it! i think is impossible i am the only one need to do it! :)

 

Mar 17, 2010 at 9:12 PM

On thing one of my coworkers did was to check the system time at the start of his CE app. If it was less that 1/1/2008 he prompted the user to set the date/Time as it has been lost due to dead battery.

It may be possible to launch the System Clock for manual user entry using Rapi.CreateProcess, but I don't know what to compare against.

 

 

 

Apr 20, 2010 at 2:20 PM

Hi,

I haven't done using software, but if you create an association between the device and the PC you're docking to and tell it you want to synchronise, but when asked, uncheck all the Email and Contact checkboxes, you should find that it will synchronise the time with the desktop PC.

Not sure if that helps you in your situation, but it works well for me.

 

 

Sep 30, 2013 at 11:22 AM
Hi,

I just found the solution to your problem. davymac is right.

You lanch two rapi.CreateProcess, one for the date and one for the time.
rapi.CreateProcess("cmd", "/c date " + DateTime.Now.ToString("dd-MM-yyyy"));
rapi.CreateProcess("cmd", "/c time " + DateTime.Now.ToString("HH:mm:ss"));

It will open two windows command prompt to synchronise the mobile with the clock on your PC.