Skip to content

Use network time instead of device time #339

@marandaneto

Description

@marandaneto

Description

Relates to PostHog/posthog-android#223

Description

  • Android
  • iOS
  • Flutter
  • RN

Alternatives: https://android-developers.googleblog.com/2025/02/trustedtime-api-introducing-reliable-approach-to-time-keeping-for-apps.html?m=1
https://developer.android.com/reference/android/os/SystemClock#currentNetworkTimeClock() (API 33)
https://github.com/instacart/truetime-android

Analytics data, recordings, etc, all depend on the timestamp. The server does clock drifting if it's off in the past or future, but that's not ideal.
Devices can be way in the past, future or just off by a few minutes due to user's settings, I believe using a network time would be way better

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions