Answer the question
In order to leave comments, you need to log in
What is the correct way to store time in a calendar type application?
You need to create a small application like Googe Calendar in which you want to save events for a specific start and end time.
The question is: is it necessary to store the time in the timezone in which the user who created the event is located, or can it be stored in UTC, and when displayed on the calendar, correct according to the current timezone?
Thank you all for your answers, most of them for storing time in unixtime. Tell me, how suitable is this approach for MongoDB? I mean how will the selection be made by dates?
Answer the question
In order to leave comments, you need to log in
I always kept time in unixtime
And the belt can already be pulled out of the user's profile.
Best in UTC.
But you also need to make an adjustment to the time from the zone.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question