
Originally Posted by
petrib
Can't be done in a fully secure/reliable way.
Technically, hardware manufactuers could include a tamper-resistant/secure real-time clock in the device, which cannot be set/modified by software/apps, or by resetting, reformatting, reflashing the phone. However, as far as I know, no manufacturer has seen the need to invest in such technology.
So, make an app that keeps track of the time on your server, and clocks events at the server (which the users of your app has no access to). Then it doesn't matter what the phone time is, but what the time is at the server, which you can control. Then the tracking app must always have a network connection when it sends these tracking events (SMS would also do), but it never needs to care about what the phone's time/date settings happen to be.