Skip to content

Commit 5b667f2

Browse files
committed
Makes time_zone_database configurable
1 parent bfe967a commit 5b667f2

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/cocktail/time.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,6 @@ defmodule Cocktail.Time do
340340
def parse(_, _), do: {:error, :invalid_format}
341341

342342
defp get_time_zone_datebase do
343-
Application.get_env(:elixir, :time_zone_database, Tzdata.TimeZoneDatabase)
343+
Application.get_env(:elixir, :time_zone_database)
344344
end
345345
end

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ defmodule Cocktail.Mixfile do
8181
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
8282
{:ex_doc, "~> 0.23", only: :dev, runtime: false},
8383
{:excoveralls, "~> 0.10", only: :test},
84-
{:tzdata, "~> 1.1"}
84+
{:tzdata, "~> 1.1", only: :test}
8585
]
8686
end
8787
end

test/test_helper.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
ExUnit.configure(exclude: [pending: true], formatters: [ExUnit.CLIFormatter, ExUnitNotifier])
22
ExUnit.start()
3-
3+
Application.put_env(:elixir, :time_zone_database, Tzdata.TimeZoneDatabase)
44
Code.require_file("test/support/datetime_sigil.ex")

0 commit comments

Comments
 (0)