Answer the question
In order to leave comments, you need to log in
How to get server time in Google Firebase?
How to get server time in Google Firebase?
Answer the question
In order to leave comments, you need to log in
If I understand the question correctly - do you need to save server time?
For firestore:
const admin = require('firebase-admin');
admin.initializeApp();
const db = admin.firestore();
const FieldValue = require('firebase-admin').firestore.FieldValue;
const timestamp = db
.collection('data')
.doc('base')
.set({ timestamp: FieldValue.serverTimestamp() });
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question