function timezoneList() {
    let result = [];
    const timeZones = getTimeZones();

    for (let timezone of timeZones) {
        try {
            let display = dayjs().tz(timezone.name).format("Z");

            result.push({
                name: `(UTC${display}) ${timezone.name}`,
                value: timezone.name,
                time: getTimezoneOffset(timezone.name),
            });
        } catch (e) {
            // Skipping not supported timezone.name by dayjs
        }
    }

    result.sort((a, b) => {
        if (a.time > b.time) {
            return 1;
        }

        if (b.time > a.time) {
            return -1;
        }

        return 0;
    });

    return result;
}
Returns a list of timezones sorted by their offset from UTC.
@returns {object[]} A list of the given timezones sorted by their offset from UTC.

Generated by Trelent