# Which clock does Onlykey App on Linux use for TOTP?

**URL:** <https://onlykey.discourse.group/t/which-clock-does-onlykey-app-on-linux-use-for-totp/1285>\
**Category:** Two Factor Authentication\
**Created:** [May 21, 2024, 4:29pm UTC](https://onlykey.discourse.group/t/which-clock-does-onlykey-app-on-linux-use-for-totp/1285 "2024-05-21T16:29:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cla](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@cla](https://onlykey.discourse.group/u/cla)\
**Post date:** [May 21, 2024, 4:29pm UTC](https://onlykey.discourse.group/t/which-clock-does-onlykey-app-on-linux-use-for-totp/1285/1 "2024-05-21T16:29:21Z")

</div>

I ran into issues with my OATH-TOTP codes not getting accepted. Some investigation brought to light that my computer’s RTC/Hardware time was way off (2 minutes lagging). However, that was ONLY my RTC/Hardware clock. My system clock (what’s shown on the desktop), however, was spot on (kept precise through systemd-timesyncd on Debian 12).

Now I wonder…what clock is Onlykey App actually using? Based on my observation, it would be using the RTC/hardware clock of my computer…which can be wrong, and shouldn’t be used anyway, since the system clock would be the one corrected by services like systemd-timesyncd or chronyd or ntpd…making this clock the better choice for Onkey App to use.

Or am I missing something?

Another, possibly related observation: When comparing with a different OATH-TOTP app (on my phone (IOS OTP Auth) or in KeepassXC), the Onlykey codes are getting changed/updated approximately 5-10 seconds BEFORE they are getting updated on my phone or in KeepassXC. This is also weird/unexpected, since I would expect them to change synchronous (assuming (and verified) the time on the devices is in sync to the second).

(Debian 12, Onlykey _App v5.5.0_ _OnlyKey DUO v3.0.4-prodp_)
