Get The Current TimeDate From GPRS C#

216 Views Asked by At

I am writing an application with C# for Windows CE in Pocket PC. I need to sync current time and date with GPRS. My pocket PC device doesn't have sync clock so i have to write a class for it.But i don't know how.Any idea please?

2

There are 2 best solutions below

0
Guoyuan Zhao On

I do not have permission to comment, so I continue my answer here: How to get DateTime from the internet?

if you can not do copy-paste coding, then get the data from internet and parse it by yourself, is is simple xml.

0
josef On

If the device or the cell network provider does not provide a Time Server by means of the GPRS network, you need to code either for SNTP or other time sync solution your self.

BTW: the GPRS cell tower Time information (NITZ) is most incorrect or not available at all. It is not well supported/managed by the cell providers.

A custom app to read the cell network time needs access to the Radio Interface Layer (MS API), doing direct AT commands to the cell modem will mostly not work as the communication channel is blocked by the MS RIL driver.