DEV Community

Eulier Gonzalez
Eulier Gonzalez

Posted on

2 1

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.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay