# -*- encoding: utf-8 -*-
"""
@File    : TimeZone.py
@Time    : 2023/8/15 15:27
@Author  : stephen
@Email   : zhangdongming@asj6.wecom.work
@Software: PyCharm
"""
from enum import Enum


class TimeZone(Enum):
    INTERNATIONAL_DATE_LINE_WEST = (0, '-12:00')
    MIDWAY_ISLAND_SAMOA = (1, '-11:00')
    HAWAII = (2, '-10:00')
    ALASKA = (3, '-09:00')
    PACIFIC_TIME_US_CANADA = (4, '-08:00')
    MOUNTAIN_TIME_US_CANADA = (5, '-07:00')
    CENTRAL_TIME_US_CANADA = (6, '-06:00')
    EASTERN_TIME_US_CANADA = (7, '-05:00')
    CARACAS = (8, '-04:30')
    ATLANTIC_TIME_CANADA = (9, '-04:00')
    NEWFOUNDLAND = (10, '-03:50')
    GEORGETOWN_BRASILIA = (11, '-03:00')
    MID_ATLANTIC = (12, '-02:00')
    CAPE_VERDE_ISLANDS_AZORES = (13, '-01:00')
    DUBLIN_EDINBURGH_LONDON = (14, '+00:00')
    AMSTERDAM_BERLIN_ROME_PARIS = (15, '+01:00')
    ATHENS_JERUSALEM_ISTANBUL = (16, '+02:00')
    BAGHDAD_KUWAIT_MOSCOW = (17, '+03:00')
    TEHRAN = (18, '+03:30')
    CAUCASUS_STANDARD_TIME = (19, '+04:00')
    KABUL = (20, '+04:50')
    ISLAMABAD_KARACHI_TASHKENT = (21, '+05:00')
    MADRAS_BOMBAY_NEW_DELHI = (22, '+05:50')
    KATHMANDU = (23, '+05:45')
    ALMATY_NOVOSIBIRSK_DHAKA = (24, '+06:00')
    YANGON = (25, '+06:30')
    BANGKOK_HANOI_JAKARTA = (26, '+07:00')
    BEIJING_URUMQI_SINGAPORE = (27, '+08:00')
    SEOUL_TOKYO_OSAKA_SAPPORO = (28, '+09:00')
    ADELAIDE_DARWIN = (29, '+09:30')
    MELBOURNE_SYDNEY_CANBERRA = (30, '+10:00')
    MAGADAN_SOLOMON_ISLANDS = (31, '+11:00')
    AUCKLAND_WELLINGTON_FIJI = (32, '+12:00')
    UTC_13 = (33, '+13:00')

    def __str__(self):
        return f"{self.value[1]}) {self.name.replace('_', ' ')}"

    @classmethod
    def get_value(cls, index):
        for timezone in cls:
            if timezone.value[0] == index:
                return timezone.value[1]
        return None


if __name__ == '__main__':
    result = TimeZone.get_value(30)
    print(result)
