Skip to content

Commit

Permalink
Makes time_zone_database configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
brianberlin committed Jan 30, 2024
1 parent bfe967a commit 5b667f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/cocktail/time.ex
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,6 @@ defmodule Cocktail.Time do
def parse(_, _), do: {:error, :invalid_format}

defp get_time_zone_datebase do
Application.get_env(:elixir, :time_zone_database, Tzdata.TimeZoneDatabase)
Application.get_env(:elixir, :time_zone_database)
end
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defmodule Cocktail.Mixfile do
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.23", only: :dev, runtime: false},
{:excoveralls, "~> 0.10", only: :test},
{:tzdata, "~> 1.1"}
{:tzdata, "~> 1.1", only: :test}
]
end
end
2 changes: 1 addition & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ExUnit.configure(exclude: [pending: true], formatters: [ExUnit.CLIFormatter, ExUnitNotifier])
ExUnit.start()

Application.put_env(:elixir, :time_zone_database, Tzdata.TimeZoneDatabase)
Code.require_file("test/support/datetime_sigil.ex")

0 comments on commit 5b667f2

Please sign in to comment.