0

I am creating an application where the user sends a purchase request to a web server, and this process of sending the request feeds back some analytics data. Specifically, this data requires a time stamp that records when the request was made.

Ordinarily, DateTime.Now would be suitable. However this uses the time from the phone/system time, which cannot be completely trusted; as the user may have modified this time through the phones settings.

My question; Is there a way to detect whether the system time has been manually set or not? And/Or is there a recommended way to automatically fetch the REAL time, just like how the the "set automatically" switch in the WP7 settings menu does? I understand that the WP7 method uses data from the mobile network/carrier, and this may not be supported on all devices/networks. DateTime.Now is a feasible backup (if the analytics data can be laballed as such by checking if automatic time is used), but if there is a recommended way to prioritise using carrier time (or something equivilent using the data connection), that would be most useful.

I have searched this site and around the web and MSDN, but I have not found anything that specifically fits this requirement. Thanks.

4

0 に答える 0