Open tisdall opened 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', }
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.