0

What would be the best approach to handle a wrong date and time on a device when dealing with data that is dependent, for example, on the current date?

Let's say you have a next and previous object ordered by the date on the server, but you must sort those objects later on, on a different screen based on the current date (which is local), how to deal with this?

I see that apps like Facebook, Skype, use the device's date and make calculations based on that. For example in the Facebook app, if you set the device's date in the past, all the posts from the past date to the real one will be marked as "Just now".

I'm quite puzzled about a best practice on this matter, if you could help me with some advice, I'd be grateful.

1

The amount of effort you should put in to fix something depends on 2 things

How significant is impact?

How likely is it?

In the given example

  • The relative times on social media (i.e post was 1 week ago, 3 hours ago) is a trivial item
  • PC's have a very strong tendency to be kept close to the correct time

Thus in combination zero effort is the right amount to work to dedicate to the problem in this case.

If it is a critical case then list exact sever times in standard format such as ISO 8601 that includes time-zone as any attempt to 'sync' local clock to server clock could have issues

Each other case I can think of is very much dependant on individual situation.

  • I love getting answers from the right people. The date in this case is not even precise: it's just the day (no hour/minute/second). My main concern was that the server could respond with a next and previous object that are different from the ones that I display on the UI as we do the next / previous sorting based on the device's date. Making the API call would return NEXT: D, PREVIOUS: C while on UI, we would have NEXT: B, PREVIOUS: A. Does that make sense? – Cyupa Oct 20 '15 at 11:13
  • ah if I do understand correctly that more of an implementation question than a UX question. Possibly "stackexchange" will have more experts on API / paging design. But bottom line the [Next] / [Prev] in a list should be relevant to the list items themselves - including any date marker or ID the list items have, which may have very little to do with the dates you display to the user, or date on client. – Jason A. Oct 20 '15 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.