void switch_load_timezones(switch_bool_t reload)
{
	switch_xml_t xml = NULL, x_lists = NULL, x_list = NULL, cfg = NULL;
	unsigned total = 0;
	static switch_timezones_list_t TIMEZONES_LIST_NEW = { 0 };
	static switch_timezones_list_t TIMEZONES_LIST_OLD = { 0 };

	switch_core_new_memory_pool(&TIMEZONES_LIST_NEW.pool);
	switch_core_hash_init(&TIMEZONES_LIST_NEW.hash);

	if ((xml = switch_xml_open_cfg("timezones.conf", &cfg, NULL))) {
		if ((x_lists = switch_xml_child(cfg, "timezones"))) {
			for (x_list = switch_xml_child(x_lists, "zone"); x_list; x_list = x_list->next) {
				const char *name = switch_xml_attr(x_list, "name");
				const char *value = switch_xml_attr(x_list, "value");

				if (zstr(name)) {
					continue;
				}

				if (zstr(value)) {
					continue;
				}

				switch_core_hash_insert(TIMEZONES_LIST_NEW.hash, name, switch_core_strdup(TIMEZONES_LIST_NEW.pool, value));
				total++;
			}
		}

		switch_xml_free(xml);
	}

	TIMEZONES_LIST_OLD.hash=TIMEZONES_LIST.hash;
	TIMEZONES_LIST_OLD.pool=TIMEZONES_LIST.pool;
	TIMEZONES_LIST.hash=TIMEZONES_LIST_NEW.hash;
	TIMEZONES_LIST.pool=TIMEZONES_LIST_NEW.pool;

	if (TIMEZONES_LIST_OLD.hash) {
		switch_core_hash_destroy(&TIMEZONES_LIST_OLD.hash);
	}

	if (TIMEZONES_LIST_OLD.pool) {
		switch_core_destroy_memory_pool(&TIMEZONES_LIST_OLD.pool);
	}

	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Timezone %sloaded %d definitions\n", reload ? "re" : "", total);
}
