Fix timestamps to always create as :utc_datetime.

This commit is contained in:
James Harton 2018-04-08 12:25:31 +12:00
parent 8686112df7
commit 8f0a9a1e66
2 changed files with 7 additions and 5 deletions

View file

@ -6,22 +6,22 @@
use Mix.Config
# General application configuration
config :faces,
ecto_repos: [Faces.Repo]
config :faces, ecto_repos: [Faces.Repo]
# Configures the endpoint
config :faces, FacesWeb.Endpoint,
url: [host: "localhost"],
secret_key_base: "ThLNldzPhX4I3g7eg79qoWrA1dj48zfsJBwbivAgNXq3XxhIo8tYh7jtteExdh0N",
render_errors: [view: FacesWeb.ErrorView, accepts: ~w(html json)],
pubsub: [name: Faces.PubSub,
adapter: Phoenix.PubSub.PG2]
pubsub: [name: Faces.PubSub, adapter: Phoenix.PubSub.PG2]
# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:user_id]
config :faces, Faces.Repo, migration_timestamps: [type: :utc_datetime]
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env}.exs"
import_config "#{Mix.env()}.exs"

View file

@ -2,6 +2,8 @@ defmodule Faces.Gallery.Person do
use Ecto.Schema
import Ecto.Changeset
@timestamps_opts [type: :utc_datetime, usec: true]
schema "people" do
field(:username, :string)
field(:avatar_url, :string)