开发者

Get time zone or local time from cell tower (GPRS)

开发者 https://www.devze.com 2022-12-23 00:54 出处:网络
I have been asked to set the system time of a Windows Mobile 6.0 handheld to the \"local time.\"The local time in this case means the current time of the time 开发者_如何学运维zone the handheld is phy

I have been asked to set the system time of a Windows Mobile 6.0 handheld to the "local time." The local time in this case means the current time of the time 开发者_如何学运维zone the handheld is physically located in. Is there a way to request the local time from the GPRS cell tower?


You can use the RIL API

HRESULT RIL_GetSystemTime(HRIL hRil);

This returns you an HRESULT that, if positive, will identify a SYSTEMTIME structure returned on the notify thread in the lpData parameter.

The caveat I should give is that not all networks transmit the local time, so this is not guaranteed to work.

Many Windows Mobile devices have a settings option to synchronize the time to network time if it is transmitted, so you may want to try this if it is available on your device.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号