How do I get the server timestamp in Cloud Functions for Firebase?

前端 未结 7 1190
轮回少年
轮回少年 2020-12-03 00:12

I know you can pull the server timestamp in web, ios, and android - but what about the new Cloud Functions for Firebase? I can\'t figure out how to get the server timestamp

7条回答
  •  自闭症患者
    2020-12-03 01:09

    Since you're already using the admin SDK, the correct syntax is:

    admin.database.ServerValue.TIMESTAMP
    

提交回复
热议问题