Using config/3 macro when 3rd argument is not a keyword list

I’m trying to use Tzdata module, and according to the Getting Started section of the hexdoc

, the following config should be used:

config :elixir, :time_zone_database, Tzdata.TimeZoneDatabase

Issue 1
When trying to follow this I had the problem of having no config file in my project (generated using mix new projectname) - I’ve provisionally created config/config.exs at the root, with use Mix.Config at the top, based on previous example project. However, documentation about config states that depending on whether you want that the config info to influence the initial build, or be accessible at runtime, you should use put it in runtime.exs or config.exs.
In the case I’m not sure which is appropriate - should it be in config.exs?

Issue 2
Secondly, I’ve updated to a newer version of Elixir (1.13.3) since making the previous example project, and now I’m being warned that Mix.Config is deprecated.In order to migrate to the newer Config module, I want to understand what the line config :elixir, :time_zone_database, Tzdata.TimeZoneDatabase actually does. Looking at the documentation of Mix.Config.config/3, I would expect the arguments to be: root element, key, options (keyword list?) - but here we have:
root element = Elixir
key = :time_zone_database
options(s) = Tzdata.TimeZoneDatabase

Specifying the options as Tzdata.TimeZoneDatabase surely does not pass for a keyword list, so what’s going on here?

You probably want that one in config.exs.

You often have these files:

config/
- config.exs
- dev.exs
- prod.exs
- runtime.exs
- test.exs

config.exs is your base config and others are imported afterwards, depending on the environment, like so:

# This file is responsible for configuring your application
# and its dependencies with the aid of the Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.

# General application configuration
import Config

... your config here ...

# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{config_env()}.exs"

If you’re using releases, runtime.exs will end up in the release directory, so you can edit it after the fact. The others will vanish, like magic (or be compiled).

All the config will end up in your Application env, which you can retrieve using Application.fetch_env/get_env and friends. Notice the typespec for Application.put_env is put_env(app(), key(), value(), timeout: timeout(), persistent: boolean()) :: :ok, where value() :: term().

Config.config/3 is config(root_key, key, opts). It talks about keyword lists, which may lead us to think we can only put keyword lists in there, but as we can see from our config files, and Application.put_env, we can jam just about anything in there. Typically it is either a single value or a keyword list.

I see, as you suggested I have got it working using config.exs.

Config is also now working using the module name as opposed to a keyword list - for some reason I was getting an error when using just the module name, but after adjusting a few places and retrying, it seems the source of the error was somewhere else. Thankyou!