Open obsidienne opened 2 years ago
I would advice to store the date times NOT in UTC, but in the time zone of the event. So in the database you would have the datetime and time zone identifier.
But I guess that doesn't really answer your question. I'm not sure what you want me to advice. The store data in DB we use Ecto. You just need to add the date and time zone fields in your db table.
A friend just told me about the hex package tz_datetime. This lib adds convenience functions to store and retrieve datetime with timezone.
Could be something interesting to add to your lib.
Thanks for your answer.
Hi,
I need to store and retrieve date for upcoming events (start datetime and end datetime).
I will use tz and tzdata for the timezone handling but the datetime storage/retrieve is missing to complete the use case.
Do you have any advice ?
Thanks.