smartrent / zoneinfo

Elixir time zone support for your OS-supplied zoneinfo files
25 stars 2 forks source link

Get the IANA db version? #17

Open mathieuprog opened 1 year ago

mathieuprog commented 1 year ago

Didn't look into the lib much, but is there any way to get the version of the IANA time zone database used?

fhunleth commented 1 year ago

I'm not sure how standard this is, but try:

iex(1)> File.read("/usr/share/zoneinfo/+VERSION")
{:ok, "2022f\n"}

If this is a thing, it definitely seems convenient to add support for in the library.