Skip to content

Commit 55a1acb

Browse files
committed
Set a default timezone on mix ecto.create
1 parent 9bac4c4 commit 55a1acb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/mix/tasks/ecto.create.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ defmodule Mix.Tasks.Ecto.Create do
88
quiet: :boolean,
99
repo: [:string, :keep],
1010
no_compile: :boolean,
11-
no_deps_check: :boolean
11+
no_deps_check: :boolean,
12+
timezone: :string
1213
]
1314

1415
@aliases [
@@ -38,6 +39,10 @@ defmodule Mix.Tasks.Ecto.Create do
3839
* `--quiet` - do not log output
3940
* `--no-compile` - do not compile before creating
4041
* `--no-deps-check` - do not compile before creating
42+
* `--timezone` - the timezone of the database. By default,
43+
it is Etc/UTC. Of the default database adapters, only
44+
PostgreSQL supports timezone. Use `--no-timezone` to use
45+
the default timezone of the database
4146
4247
"""
4348

0 commit comments

Comments
 (0)