         utc_off: utc_off,
         from: %{utc: from, wall: from_wall_time, standard: from_standard_time},
         until: %{standard: until_standard_time, wall: until_wall_time, utc: until_utc},
-        zone_abbr: zone_line_hd[:format]
+        zone_abbr: zone_line_hd.format
       }
     h_calc_periods_no_rules(period, until_utc, zone_line_tl, letter)
   end
 
   def calc_periods([zone_line_hd|zone_line_tl], from, zone_hd_rules, letter) do
     std_off = 0 # we start out by assuming there is no offset. the rules might change this
-    utc_off = zone_line_hd[:gmtoff]
-    from_standard_time = standard_time_from_utc(from, utc_off)
-    zone_has_until_limit = zone_line_hd[:until] != nil
+    utc_off = zone_line_hd.gmtoff
+    from_standard_time = standard_time_from_utc(from, utc_off)
+    zone_has_until_limit = Map.get(zone_line_hd, :until) != nil
 
     # Get the year of the "from" time. We use the standard time with utc offset
     # applied. If for instance we are ahead of UTC and the period starts at the

        utc_off: utc_off,
        from: %{utc: from, wall: from_wall_time, standard: from_standard_time},
        until: %{standard: until_standard_time, wall: until_wall_time, utc: until_utc},
        zone_abbr: zone_line_hd[:format]
      }
    h_calc_periods_no_rules(period, until_utc, zone_line_tl, letter)
  end

  end
  defp calc_periods_h(zone_name) do
    {:ok, zone} = zone(zone_name)
    calc_periods(zone.zone_lines, :min, Map.get(hd(zone.zone_lines), :rules), "")
  end

  def calc_periods([zone_line_hd|zone_line_tl], from, zone_hd_rules, letter) when zone_hd_rules == nil do
    std_off = 0 # since there are no rules, there is no standard offset
    utc_off = zone_line_hd.gmtoff
    from_standard_time = standard_time_from_utc(from, utc_off)
    from_wall_time = wall_time_from_utc(from, utc_off, std_off)
    until_utc = datetime_to_utc(Map.get(zone_line_hd, :until), utc_off, std_off)
    until_standard_time = standard_time_from_utc(until_utc, utc_off)
    until_wall_time = wall_time_from_utc(until_utc, utc_off, std_off)
    period = %{
