firebase/database `serverTimestamp()` returns future time
Operating System
Windows 11
Environment (if applicable)
Chrome 142
Firebase SDK Version
12.4.0
Firebase SDK Product(s)
Database
Project Tooling
Vue app w/ Vite
Detailed Problem Description
We have two projects (dev/prd)
and serverTimestamp() records:
- correct time in dev project
- INCORRECT time in prd project (about 1 minute ahead)
.info/serverTimeOffset returns:
- small value in dev project
- large value (over 70000) in prd project
Is there a way to fix this large time offset? or shouldn't I trust firebase server timestamp?
Steps and code to reproduce issue
https://gist.github.com/mmyoji/9475c30446cf5779bd9fae1a5f2eb5a0
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Since the difference is between two projects, I don't think we could reproduce or examine the problem without looking at the exact projects involved. Obviously you wouldn't want to share the project details here publicly. If you contact Firebase Support (https://firebase.google.com/support) they may be able to look at your exact projects and try to figure out what the difference is between them.
Firebase Support said that they didn't have the permission to our projects and they had no idea.
We've given up using the serverTimestamp() and manage it by ourselves.