Today I Learned

hashrocket A Hashrocket project

Ecto timestamps as utc_datetime

When you define your Ecto schema with timestamps the default is to use naive_datetime but you have an option to specify utc_datetime if that's what you want:

schema "products" do
  timestamps(type: :utc_datetime)
See More #elixir TILs
Looking for help? At Hashrocket, we 💜 Elixir! From our many Elixir client projects, to sponsoring the Chicago Elixir Meetup, to the source code for this application, we are invested in this community. Contact us today to talk about your Elixir project.