#1821·Aegis

User-Configurable Time Offset to Fix TOTP Mismatch on Android Devices with Obsolete Timezone Data

Author: Ya-ZahraCreated Aug 3, 2026Updated Aug 3, 2026
Labelsproposal

1. Executive Summary

We propose adding a simple, user‑configurable time correction setting in the Aegis app. This feature is critical for users in countries such as Iran, where DST has been permanently abolished but the change is not reflected in the timezone data of older Android devices. The setting would let users manually adjust the UTC offset used for TOTP generation, without requiring risky system‑level modifications (e.g., rooting) that are especially dangerous for devices that will no longer receive OS updates.


2. Problem Statement – The Iran Timezone Inconsistency

As of September 2022, Iran officially repealed DST and now observes standard time (UTC+03:30) throughout the year. The IANA timezone database has been updated accordingly for 2023 onward.

However, this creates a serious issue for Android users:

  • Outdated system data: Many Android phones, particularly those on Android 11 and older, do not receive timezone database updates. Although AOSP incorporated the Iran change in Q‑release branches from late 2022, the update has not been deployed to all devices.

  • Incorrect system clock: When a device with an outdated database selects the "Asia/Tehran" timezone, it still applies DST rules. As a result, the system clock is shifted one hour forward during the months when DST used to be active (roughly March–September).

  • TOTP generation error: TOTP codes are calculated based on UTC time. The system's UTC offset is derived from the local timezone rules. If the local time is wrong, the generated codes are wrong too. Even a few seconds of discrepancy can cause repeated authentication failures.


3. Technical Challenges and User Demographics

Aegis relies on the Android system time for TOTP generation and does not perform its own time synchronisation. This creates a direct dependency on the correctness of the OS timekeeping.

This problem predominantly affects users in Iran who are on older Android devices (< 12). Applying a system‑level fix on these devices is problematic for several reasons:

  1. No built‑in option: Many older devices do not provide a user‑facing setting to disable DST.

  2. Requires rooting: Manual workarounds typically involve rooting the device, replacing system zoneinfo files, or using ADB commands to set a custom timezone. Rooting voids warranties, introduces security vulnerabilities, and carries a non‑negligible risk of bricking the device.

  3. Not sustainable: The temporary ADB workaround (settings put global time_zone "GMT+03:30") is not practical for average users and can be reset by system events.


4. Proposed Solution – Manual Time Offset in Aegis

We recommend adding a "Time Correction" (or "Time Offset") setting within the Aegis app.

Concept: This setting would let the user manually apply a positive or negative offset (in seconds Or half an hour) to the UTC time used exclusively for TOTP calculations inside Aegis. It does not alter the system clock, so no root access is required.

Suggested Implementation:

  • Add a new entry in the Settings menu, e.g., "Fix code time errors".
  • Provide a simple input field for the offset, or use step‑buttons with Half-hour increments.
  • Include a "Test" button that lets users compare a code generated by Aegis with the current system time to verify the correction. This approach is already used successfully in several other authenticator apps.

Benefits:

  1. User‑friendly: Offers a straightforward, actionable solution for non‑technical users without system intervention.
  2. Low risk: Eliminates the danger of bricking the device or compromising security via rooting.
  3. Broader applicability: Helps users in other regions that may face similar timezone changes, as well as users whose device clocks drift over time.
  4. Future‑proof: Provides a robust fallback independent of future Android updates, ensuring long‑term usability for devices that are no longer supported.

5. Conclusion

Implementing a manual time correction feature is a practical, user‑centric approach to a complex platform‑level problem. It directly addresses the urgent need of users in Iran and similar regions, improves Aegis's reliability, and demonstrates a commitment to supporting a diverse user base across different Android versions. We strongly encourage the team to consider this feature for the next release.