The IANA time zone database for Elixir, kept up to date automatically
open sourceMITfree
Tzdata brings the IANA time zone database to Elixir. Configured as Elixir's time zone database, it lets the standard library's DateTime functions do time zone calculations, or it can be passed to those functions directly. It ships a recent tz release and polls IANA daily for new data, downloading, parsing and storing it as ETS files, and it can generate those files when automatic updates are disabled. It was extracted from the Calendar library.
Problems it solves
- convert times between time zones in an Elixir app
- keep time zone rules current in a long-running Elixir service without redeploying
- DateTime.now with a time zone name fails in Elixir
Features
- Plugs into Elixir's standard library as its time zone database
- Ships a recent IANA tz release
- Polls IANA daily and downloads new time zone data automatically
- Stores data as ETS files in a configurable directory
- Automatic updates can be turned off
Limitations
- Hackney support is deprecated; Erlang/OTP 25 or later is strongly recommended so it can use the built-in httpc client with certificate verification.1
Alternatives
The same job
These do what Tzdata does.
- Timex A complete date and time library for Elixir, with full time zone support
