DEV Community

Eulier Gonzalez
Eulier Gonzalez

Posted on

Will this show the users’ local time?. Pulling data from Firestore?

A client ask me that question, and frankly that something that i heard even amount others developers.

Because at the startup i'm working we're using Firestore as our DB.

So a make a quick recap on how to respond to this question:

TL;DR
Yes

The reason is, since Google Firestore store date & time as Timestamp. which follows the RFC 3339, that is a format of the ISO 8601.
An standard to represent date & time using Gregorian Calendar

So when we store date & time, it set by default to UTC, you can also change it.

And we're using momentjs format method to set that to user's localtime.

Top comments (0)