How do I set the time on Android, including setting the seconds?

I have an android handset that has no SIM, is permanently on airplane mode, and therefore doesn't sync its time from cell towers.

I use TOTP 2FA for many of my accounts, and sometimes the clock on my Android isn't precise enough to produce a valid OTP token. Therefore, I'd like to set the time manually, and TOTP would greatly benefit from being able to set the seconds as well. Unfortunately, it appears that the default "Settings -> System -> Date & Time -> Set time" route only permits me to set the hour & minute.

First, when I set the time with only the hour & minute per above, does the seconds field get set to 0? Or does the seconds field remain unchanged from before setting the updated time?

Second, how can I set the seconds in addition to the hour & minute? Bonus points for an answer that includes a GUI app from f-droid. The CLI works, but it's not exactly accessible to most..

Is there no app in f-droid that supports setting the time with seconds? I used to use NTPSync, but now it appears to not actually change the time after a successful ntp query.

fwiw, I'm using LineageOS and Android 9.

  • 1
    Changing the time requires AFAIR root. May be there is an TOTP 2FA app that allows to use a network time source instead of the local one? Or if you use an open source app you can make a feature request. – Robert Feb 5 '20 at 12:52

Your Answer

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

Browse other questions tagged or ask your own question.