I'm going to send my timestamp to server and server will check if it is in a given interval. What if My mobile clock is not adjusted (say it gives 2:00 pm while now it is 2:00 am). now I lost the server. How should I handle such a situation.
closed as unclear what you're asking by Xander, schroeder♦, Steve, TildalWave, Gilles Jul 2 '14 at 9:58
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
You either need to take system management seriously and use NT, or you could make an extra endpoint on your server poll the server for it's time.
For example, you could send a request to the server and record the request timestamp. The server should respond back with it's timestamp, and then the client can figure out the difference here and adjust your timestamp accordingly.
This way, your data will by in sync with the server minus a few nanoseconds/seconds.
client ---get timestamp--> SERVER client <---137000881--- SERVER client -- your request --> SERVER