#Should I be storing dates in utc?
9 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @autumn compass! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
It's more complicated than that. The concept of date is not timezoned. One given date doesn't start at the same time everywhere in the world, nor does it end at the same time, but it's still the same date
So it would depend on your column type, if it doesn't have a time component, then in principle time zones should not intervene, and if it does anyway, that's more the database engine being nonsensical
It's a good practice to always store UTC timestamps, and just let the front-end handle converting it to the user's locale.
thats the thing these are not timestamps, they are dates only
so store dates in local time?
In principle, you're talking in a context where no time exist but local time, and so therefore it would be more time than local time. It's just a date