I need advice how an app should ask the user if the time value that I get from the user's system is correct and, if not, how many seconds I am behind or ahead of the correct time.

For a time-sensitive task, I need the correct UNIX time (that is number of seconds since 1/1/19790, 00:00), down to circa 10 seconds.

Of course I cannot show the user the UNIX time and ask them the number of seconds that this value is off. I need to present it to them in the human readable format of hours:minutes:seconds.

My take: Display three inputs for hours, minutes, seconds, continuously updating until the user focuses and modifies the value. When the click "Save", the offset is calculated and the updates resume.

mock-up of my UI attempt so far

But this translation of UNIX time to 12:34:56 (and back) relies on a time zone. And this information is not available/may be wrong. In the worst case, a correct UNIX time would be "fixed" by the user by setting it two or three hours off.

Question: How should I design the form to provide the offset between system UNIX time and actual time?

One idea: Only show minutes and seconds (or only seconds). Is a problem when trying to use it around the full hour. Another idea: Show them minutes and seconds and let them specify the time offset in seconds in a separate input field.

  • sorry, what's the question? It's not clear
    – Devin
    Commented Aug 27, 2022 at 16:47
  • Hi devin, thank you for your comment. I tried to clarify. Commented Aug 27, 2022 at 17:24
  • You can get the time from user's system? Where does the other time comes from? The one you want to make comparison with? Does the user look at the clock on the wall and type the time they see? Commented Aug 29, 2022 at 5:26
  • Yes, I get time from the user's system (its an old java phone) and the other time is your "clock on the wall". The app is about time-based one-time-passwords, so exact timing is important. A user reported back to me: "My phone does not set or reset the seconds when setting the clock or when enabling network time sync (GSM network). So codes are a bit off." Commented Aug 29, 2022 at 16:43
  • Would using relative times ("enter OTP within 120 seconds of clicking the button") be another way to do this? Making a user fine-tune their time to get a OTP seems like a lot for them to think about.
    – Izquierdo
    Commented Sep 12, 2022 at 21:27

1 Answer 1


To answer my own question: If you want the user to only fine-tune the seconds, then only give them the means to do so. In my case this is a slider from -120 to +120 seconds and show them Minutes:Seconds how the current offset setting.

Using the UI elements that J2ME offers, this is what it looks like:

a UI concept in the J2ME emulator

A slider with a visible middle-setting would be better, but that is just not part of the standard UI toolset.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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