Parse geonames.org_ timezone exports.

        ``import_timezones_file()`` returns a dictionary with keys containing
        the timezone identifier, and values consisting of a UTC offset and UTC
        offset during daylight savings time in minutes.

        It expects data files in the following format::

            Europe/Andorra	1.0	2.0
            Asia/Dubai	4.0	4.0
            Asia/Kabul	4.5	4.5

        Files containing the data in this format can be downloaded from the
        geonames site in their `database export page`_

        Files downloaded from the geonames site when processed by
        ``import_timezones_file()`` will return ``dict`` object of the
        following style::

            {"Europe/Andorra": (60, 120),
             "Asia/Dubai": (240, 240),
             "Asia/Kabul": (270, 270)}

        Args:
            data (iter): geonames.org timezones data to read

        Returns:
            list: geonames.org timezone identifiers with their UTC offsets

        Raises:
            FileFormatError: Unknown file format

        .. _geonames.org: http://www.geonames.org/
        .. _database export page: http://download.geonames.org/export/dump/

def import_timezones_file(self, data):
        """Parse geonames.org_ timezone exports.

        ``import_timezones_file()`` returns a dictionary with keys containing
        the timezone identifier, and values consisting of a UTC offset and UTC
        offset during daylight savings time in minutes.

        It expects data files in the following format::

            Europe/Andorra	1.0	2.0
            Asia/Dubai	4.0	4.0
            Asia/Kabul	4.5	4.5

        Files containing the data in this format can be downloaded from the
        geonames site in their `database export page`_

        Files downloaded from the geonames site when processed by
        ``import_timezones_file()`` will return ``dict`` object of the
        following style::

            {"Europe/Andorra": (60, 120),
             "Asia/Dubai": (240, 240),
             "Asia/Kabul": (270, 270)}

        Args:
            data (iter): geonames.org timezones data to read

        Returns:
            list: geonames.org timezone identifiers with their UTC offsets

        Raises:
            FileFormatError: Unknown file format

        .. _geonames.org: http://www.geonames.org/
        .. _database export page: http://download.geonames.org/export/dump/
        """
        self._tzfile = data
        field_names = ('ident', 'gmt_offset', 'dst_offset')
        time_parse = lambda n: int(float(n) * 60)
        data = utils.prepare_csv_read(data, field_names, delimiter=r"	")

        self.timezones = {}
        for row in data:
            if row['ident'] == 'TimeZoneId':
                continue
            try:
                delta = list(map(time_parse,
                                 (row['gmt_offset'], row['dst_offset'])))
            except ValueError:
                raise utils.FileFormatError('geonames.org')
            self.timezones[row['ident']] = delta