matheusmello
Timezone and Database config
Hello, I am trying to use Brazil Timezone but I don’t know how to config it as default on my phoenix project.
I tried to use Tzdata but I am not sure if it is what I need.
I am new to this area and I would like to know if there is any solution to set the entire application to UTC-3 which is the standard in Brazil or if I must configure it each time a value is inserted and retrieved in the database.
Most Liked
zorn
I did a recent presentation on Time Zones that you might find helpful:
http://mikezornek.com/posts/2020/3/working-with-time-zones-in-an-elixir-phoenix-app/
Good luck!
dimitarvp
This really depends on your server and your DB configuration. If they are in sync and are in the Brazil timezone then you can just use the :naive_datime or :naive_datetime_usec Ecto types and everything should be in your local timezone.







