View Source Zoneinfo.TimeZoneDatabase (zoneinfo v0.1.8)
Calendar.TimeZoneDatabase
implementation for Zoneinfo
Pass this module to the DateTime
functions:
iex> DateTime.now!("Europe/Copenhagen", Zoneinfo.TimeZoneDatabase)
#DateTime<2021-07-24 12:56:38.324705+02:00 CEST Europe/Copenhagen>
or set it as the default by calling Calendar.put_time_zone_database/1
:
iex> Calendar.put_time_zone_database(Zoneinfo.TimeZoneDatabase)
iex> DateTime.now!("Europe/Copenhagen")
#DateTime<2021-07-24 12:56:38.324705+02:00 CEST Europe/Copenhagen>