appliedsec / pygeoip

DEPRECATED: Pure Python API for Maxmind's binary GeoIP databases
https://github.com/appliedsec/pygeoip
GNU Lesser General Public License v3.0
482 stars 111 forks source link

timezones are not IANA standard #84

Open tisdall opened 8 years ago

tisdall commented 8 years ago

I found that I needed to create a mapping from the timezones returned by pygeoip to the proper ones in pytz so I thought I'd share it here. The keys are what are returned by pygeoip and the values are the proper IANA timezones for each.

{
    'Africa/Asmera': 'Africa/Nairobi',
    'America/Indianapolis': 'America/Indiana/Indianapolis',
    'America/Montreal': 'America/Toronto',
    'Asia/Calcutta': 'Asia/Kolkata',
    'Asia/Chongqing': 'Asia/Shanghai',
    'Asia/Harbin': 'Asia/Shanghai',
    'Asia/Istanbul': 'Europe/Istanbul',
    'Asia/Katmandu': 'Asia/Kathmandu',
    'Asia/Macao': 'Asia/Macau',
    'Atlantic/Faeroe': 'Atlantic/Faroe',
    'Australia/Canberra': 'Australia/Sydney',
    'Australia/NSW': 'Australia/Sydney',
    'Australia/North': 'Australia/Darwin',
    'Australia/Queensland': 'Australia/Brisbane',
    'Australia/South': 'Australia/Adelaide',
    'Australia/Tasmania': 'Australia/Hobart',
    'Australia/Victoria': 'Australia/Melbourne',
    'Australia/West': 'Australia/Perth',
    'Chile/Continental': 'America/Santiago',
    'Pacific/Samoa': 'Pacific/Pago_Pago',
    'US/Samoa': 'Pacific/Pago_Pago',
}