Zoneinfo (zoneinfo v0.1.0) View Source
Elixir time zone support for your OS-supplied time zone database
Tell Elixir to use this as the default time zone database by running:
Calendar.put_time_zone_database(Zoneinfo.TimeZoneDatabase)
Time zone data is loaded from the path returned by tzpath/0
. The default
is to use /usr/share/zoneinfo
, but that may be changed by setting the
$TZPATH
environment or adding the following to your project's config.exs
:
config :zoneinfo, tzpath: "/custom/location"
Call time_zones/0
to get the list of supported time zones.
Link to this section Summary
Link to this section Functions
Specs
time_zones() :: [String.t()]
Return all known time zones
This function scans the path returned by tzpath/0
for all time zones and
performs a basic check on each file. It may not be fast. It will not return
the aliases that zoneinfo uses for backwards compatibility even though they
may still work.
Specs
tzpath() :: binary()
Return the path to the time zone files