Is there a way in Elixir or Erlang to print out the name of current timezone? I know that I can get the local time in Elixir by calling the Erlang Calendar module.
:calendar.local_time
and I can get the current time in UTC in Elixir by using the Calendar package:
Calendar.DateTime.now_utc()
However, neither of these packages provide me with a method that will return the name of the current time zone. I would like to store my dates in UTC but display them in the local time zone. Where I live, the current timezone is called "MST7MDT" (and "MST" when DST is not in effect) but I don't want to hard code those strings into my program.
Is there a way to have Elixir tell me that my current timezone is "MST7MDT", so I can then use the Calendar.DateTime functions to format my DateTimes correctly?