Friday 30 August 2019

How do i deal with dates and times from my mobile client?

How do I deal with dates and time inputs from my iOS/Android application?Lets say a user starts a event at 2.30, my app sends the information about the event and the time it was started.Now umm? What then? Because if I save that to the DB like that, the event wont be visible to sime others in different time zones, even if it should be! Should i also send a code of which time zone it is with the share?But then again, we are relying on client input for this kind of thing, WHICH IS TERRIFYING, AND SO WRONG. So obviously the solution would be to stamp the event time on the server while saving it to the db! But the problem is still the same lol, then its the servers time, and people in different time zones will see the event timing wrong.What would be the best way to deal with this?I know this is question really simple, and ill probably figure it out on google in the next hour.So why did I make this post then?Because theres something else...What about when i have to delay the time of the request to the server? If im sending large amounts of small data, thats usually what you have to do, postpone a upload to the servers to a more convenient time.BUT, the times on the stamps still need to be EXACTLY when the data was gathered.My application and this specific feature requires 30 second percision.What do I do then?And what if the user changes the time on their phone to a fake time, how do I verify that its correct?

Submitted August 30, 2019 at 02:33PM by livinglibary

No comments:

Post a Comment