Skip to content

FR: Update serverTimeOffset whenever there is change in system clock. #363

Open
@akshetpandey

Description

@akshetpandey

[REQUIRED] Step 2: Describe your environment

  • Xcode version: Version 9.0 (9A235)
  • Firebase SDK version: Firebase/Core (4.2.0)
  • Firebase Component: Database
  • Component version: Firebase/Database (4.2.0)

[REQUIRED] Step 3: Describe the problem

.info/serverOffsetTimestamp doesn't update when device time changes.

Steps to reproduce:

  1. Launch app
  2. Get .info/serverTimeOffset
  3. Background
  4. Change system time
  5. Resume
  6. Get .info/serverTimeOffset

Notice that the offset hasn't changed

Proposed implementation

On iOS this can be implemented by using applicationSignificantTimeChange callback or using UIApplicationSignificantTimeChangeNotification notification

On Android this can be implemented by using ACTION_TIME_CHANGED intent

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions