public static function get_list_of_timezones($currentvalue = null, $include99 = false) {
        self::init_zones();

        // Localise first.
        $timezones = array();
        foreach (self::$goodzones as $tzkey => $ignored) {
            $timezones[$tzkey] = self::get_localised_timezone($tzkey);
        }
        core_collator::asort($timezones);

        // Add '99' if requested.
        if ($include99 or $currentvalue == 99) {
            $timezones['99'] = self::get_localised_timezone('99');
        }

        if (!isset($currentvalue) or isset($timezones[$currentvalue])) {
            return $timezones;
        }

        if (is_numeric($currentvalue)) {
            // UTC offset.
            if ($currentvalue == 0) {
                $a = 'UTC';
            } else {
                $modifier = ($currentvalue > 0) ? '+' : '';
                $a = 'UTC' . $modifier . number_format($currentvalue, 1);
            }
            $timezones[$currentvalue] = get_string('timezoneinvalid', 'core_admin', $a);
        } else {
            // Some string we don't recognise.
            $timezones[$currentvalue] = get_string('timezoneinvalid', 'core_admin', $currentvalue);
        }

        return $timezones;
    }