Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: pygeoip/timezone.py

Issue 11577044: Switch to pygeoip for log processing to allow running it via PyPy (Closed)
Patch Set: Created Aug. 29, 2013, 7:38 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pygeoip/const.py ('k') | pygeoip/util.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # -*- coding: utf-8 -*-
2 """
3 Time zone functions. Part of the pygeoip package.
4
5 @author: Jennifer Ennis <zaylea@gmail.com>
6
7 @license: Copyright(C) 2004 MaxMind LLC
8
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/lgpl.txt>.
21 """
22
23 __all__ = ['time_zone_by_country_and_region']
24
25 _country = {
26 'AD': 'Europe/Andorra',
27 'AE': 'Asia/Dubai',
28 'AF': 'Asia/Kabul',
29 'AG': 'America/Antigua',
30 'AI': 'America/Anguilla',
31 'AL': 'Europe/Tirane',
32 'AM': 'Asia/Yerevan',
33 'AN': 'America/Curacao',
34 'AO': 'Africa/Luanda',
35 'AR': {
36 '01': 'America/Argentina/Buenos_Aires',
37 '02': 'America/Argentina/Catamarca',
38 '03': 'America/Argentina/Tucuman',
39 '04': 'America/Argentina/Rio_Gallegos',
40 '05': 'America/Argentina/Cordoba',
41 '06': 'America/Argentina/Tucuman',
42 '07': 'America/Argentina/Buenos_Aires',
43 '08': 'America/Argentina/Buenos_Aires',
44 '09': 'America/Argentina/Tucuman',
45 '10': 'America/Argentina/Jujuy',
46 '11': 'America/Argentina/San_Luis',
47 '12': 'America/Argentina/La_Rioja',
48 '13': 'America/Argentina/Mendoza',
49 '14': 'America/Argentina/Buenos_Aires',
50 '15': 'America/Argentina/San_Luis',
51 '16': 'America/Argentina/Buenos_Aires',
52 '17': 'America/Argentina/Salta',
53 '18': 'America/Argentina/San_Juan',
54 '19': 'America/Argentina/San_Luis',
55 '20': 'America/Argentina/Rio_Gallegos',
56 '21': 'America/Argentina/Buenos_Aires',
57 '22': 'America/Argentina/Catamarca',
58 '23': 'America/Argentina/Ushuaia',
59 '24': 'America/Argentina/Tucuman'
60 },
61 'AS': 'US/Samoa',
62 'AT': 'Europe/Vienna',
63 'AU': {
64 '01': 'Australia/Canberra',
65 '02': 'Australia/NSW',
66 '03': 'Australia/North',
67 '04': 'Australia/Queensland',
68 '05': 'Australia/South',
69 '06': 'Australia/Tasmania',
70 '07': 'Australia/Victoria',
71 '08': 'Australia/West'
72 },
73 'AW': 'America/Aruba',
74 'AX': 'Europe/Mariehamn',
75 'AZ': 'Asia/Baku',
76 'BA': 'Europe/Sarajevo',
77 'BB': 'America/Barbados',
78 'BD': 'Asia/Dhaka',
79 'BE': 'Europe/Brussels',
80 'BF': 'Africa/Ouagadougou',
81 'BG': 'Europe/Sofia',
82 'BH': 'Asia/Bahrain',
83 'BI': 'Africa/Bujumbura',
84 'BJ': 'Africa/Porto-Novo',
85 'BL': 'America/St_Barthelemy',
86 'BM': 'Atlantic/Bermuda',
87 'BN': 'Asia/Brunei',
88 'BO': 'America/La_Paz',
89 'BQ': 'America/Curacao',
90 'BR': {
91 '01': 'America/Rio_Branco',
92 '02': 'America/Maceio',
93 '03': 'America/Sao_Paulo',
94 '04': 'America/Manaus',
95 '05': 'America/Bahia',
96 '06': 'America/Fortaleza',
97 '07': 'America/Sao_Paulo',
98 '08': 'America/Sao_Paulo',
99 '11': 'America/Campo_Grande',
100 '13': 'America/Belem',
101 '14': 'America/Cuiaba',
102 '15': 'America/Sao_Paulo',
103 '16': 'America/Belem',
104 '17': 'America/Recife',
105 '18': 'America/Sao_Paulo',
106 '20': 'America/Fortaleza',
107 '21': 'America/Sao_Paulo',
108 '22': 'America/Recife',
109 '23': 'America/Sao_Paulo',
110 '24': 'America/Porto_Velho',
111 '25': 'America/Boa_Vista',
112 '26': 'America/Sao_Paulo',
113 '27': 'America/Sao_Paulo',
114 '28': 'America/Maceio',
115 '29': 'America/Sao_Paulo',
116 '30': 'America/Recife',
117 '31': 'America/Araguaina'
118 },
119 'BS': 'America/Nassau',
120 'BT': 'Asia/Thimphu',
121 'BW': 'Africa/Gaborone',
122 'BY': 'Europe/Minsk',
123 'BZ': 'America/Belize',
124 'CA': {
125 'AB': 'America/Edmonton',
126 'BC': 'America/Vancouver',
127 'MB': 'America/Winnipeg',
128 'NB': 'America/Halifax',
129 'NL': 'America/St_Johns',
130 'NS': 'America/Halifax',
131 'NT': 'America/Yellowknife',
132 'NU': 'America/Rankin_Inlet',
133 'ON': 'America/Toronto',
134 'PE': 'America/Halifax',
135 'QC': 'America/Montreal',
136 'SK': 'America/Regina',
137 'YT': 'America/Whitehorse'
138 },
139 'CC': 'Indian/Cocos',
140 'CD': {
141 '02': 'Africa/Kinshasa',
142 '05': 'Africa/Lubumbashi',
143 '06': 'Africa/Kinshasa',
144 '08': 'Africa/Kinshasa',
145 '10': 'Africa/Lubumbashi',
146 '11': 'Africa/Lubumbashi',
147 '12': 'Africa/Lubumbashi'
148 },
149 'CF': 'Africa/Bangui',
150 'CG': 'Africa/Brazzaville',
151 'CH': 'Europe/Zurich',
152 'CI': 'Africa/Abidjan',
153 'CK': 'Pacific/Rarotonga',
154 'CL': 'Chile/Continental',
155 'CM': 'Africa/Lagos',
156 'CN': {
157 '01': 'Asia/Shanghai',
158 '02': 'Asia/Shanghai',
159 '03': 'Asia/Shanghai',
160 '04': 'Asia/Shanghai',
161 '05': 'Asia/Harbin',
162 '06': 'Asia/Chongqing',
163 '07': 'Asia/Shanghai',
164 '08': 'Asia/Harbin',
165 '09': 'Asia/Shanghai',
166 '10': 'Asia/Shanghai',
167 '11': 'Asia/Chongqing',
168 '12': 'Asia/Shanghai',
169 '13': 'Asia/Urumqi',
170 '14': 'Asia/Chongqing',
171 '15': 'Asia/Chongqing',
172 '16': 'Asia/Chongqing',
173 '18': 'Asia/Chongqing',
174 '19': 'Asia/Harbin',
175 '20': 'Asia/Harbin',
176 '21': 'Asia/Chongqing',
177 '22': 'Asia/Harbin',
178 '23': 'Asia/Shanghai',
179 '24': 'Asia/Chongqing',
180 '25': 'Asia/Shanghai',
181 '26': 'Asia/Chongqing',
182 '28': 'Asia/Shanghai',
183 '29': 'Asia/Chongqing',
184 '30': 'Asia/Chongqing',
185 '31': 'Asia/Chongqing',
186 '32': 'Asia/Chongqing',
187 '33': 'Asia/Chongqing'
188 },
189 'CO': 'America/Bogota',
190 'CR': 'America/Costa_Rica',
191 'CU': 'America/Havana',
192 'CV': 'Atlantic/Cape_Verde',
193 'CW': 'America/Curacao',
194 'CX': 'Indian/Christmas',
195 'CY': 'Asia/Nicosia',
196 'CZ': 'Europe/Prague',
197 'DE': 'Europe/Berlin',
198 'DJ': 'Africa/Djibouti',
199 'DK': 'Europe/Copenhagen',
200 'DM': 'America/Dominica',
201 'DO': 'America/Santo_Domingo',
202 'DZ': 'Africa/Algiers',
203 'EC': {
204 '01': 'Pacific/Galapagos',
205 '02': 'America/Guayaquil',
206 '03': 'America/Guayaquil',
207 '04': 'America/Guayaquil',
208 '05': 'America/Guayaquil',
209 '06': 'America/Guayaquil',
210 '07': 'America/Guayaquil',
211 '08': 'America/Guayaquil',
212 '09': 'America/Guayaquil',
213 '10': 'America/Guayaquil',
214 '11': 'America/Guayaquil',
215 '12': 'America/Guayaquil',
216 '13': 'America/Guayaquil',
217 '14': 'America/Guayaquil',
218 '15': 'America/Guayaquil',
219 '17': 'America/Guayaquil',
220 '18': 'America/Guayaquil',
221 '19': 'America/Guayaquil',
222 '20': 'America/Guayaquil',
223 '22': 'America/Guayaquil'
224 },
225 'EE': 'Europe/Tallinn',
226 'EG': 'Africa/Cairo',
227 'EH': 'Africa/El_Aaiun',
228 'ER': 'Africa/Asmera',
229 'ES': {
230 '07': 'Europe/Madrid',
231 '27': 'Europe/Madrid',
232 '29': 'Europe/Madrid',
233 '31': 'Europe/Madrid',
234 '32': 'Europe/Madrid',
235 '34': 'Europe/Madrid',
236 '39': 'Europe/Madrid',
237 '51': 'Africa/Ceuta',
238 '52': 'Europe/Madrid',
239 '53': 'Atlantic/Canary',
240 '54': 'Europe/Madrid',
241 '55': 'Europe/Madrid',
242 '56': 'Europe/Madrid',
243 '57': 'Europe/Madrid',
244 '58': 'Europe/Madrid',
245 '59': 'Europe/Madrid',
246 '60': 'Europe/Madrid'
247 },
248 'ET': 'Africa/Addis_Ababa',
249 'FI': 'Europe/Helsinki',
250 'FJ': 'Pacific/Fiji',
251 'FK': 'Atlantic/Stanley',
252 'FO': 'Atlantic/Faeroe',
253 'FR': 'Europe/Paris',
254 'FX': 'Europe/Paris',
255 'GA': 'Africa/Libreville',
256 'GB': 'Europe/London',
257 'GD': 'America/Grenada',
258 'GE': 'Asia/Tbilisi',
259 'GF': 'America/Cayenne',
260 'GG': 'Europe/Guernsey',
261 'GH': 'Africa/Accra',
262 'GI': 'Europe/Gibraltar',
263 'GL': {
264 '01': 'America/Thule',
265 '02': 'America/Godthab',
266 '03': 'America/Godthab'
267 },
268 'GM': 'Africa/Banjul',
269 'GN': 'Africa/Conakry',
270 'GP': 'America/Guadeloupe',
271 'GQ': 'Africa/Malabo',
272 'GR': 'Europe/Athens',
273 'GS': 'Atlantic/South_Georgia',
274 'GT': 'America/Guatemala',
275 'GU': 'Pacific/Guam',
276 'GW': 'Africa/Bissau',
277 'GY': 'America/Guyana',
278 'HK': 'Asia/Hong_Kong',
279 'HN': 'America/Tegucigalpa',
280 'HR': 'Europe/Zagreb',
281 'HT': 'America/Port-au-Prince',
282 'HU': 'Europe/Budapest',
283 'ID': {
284 '01': 'Asia/Pontianak',
285 '02': 'Asia/Makassar',
286 '03': 'Asia/Jakarta',
287 '04': 'Asia/Jakarta',
288 '05': 'Asia/Jakarta',
289 '06': 'Asia/Jakarta',
290 '07': 'Asia/Jakarta',
291 '08': 'Asia/Jakarta',
292 '09': 'Asia/Jayapura',
293 '10': 'Asia/Jakarta',
294 '11': 'Asia/Pontianak',
295 '12': 'Asia/Makassar',
296 '13': 'Asia/Makassar',
297 '14': 'Asia/Makassar',
298 '15': 'Asia/Jakarta',
299 '16': 'Asia/Makassar',
300 '17': 'Asia/Makassar',
301 '18': 'Asia/Makassar',
302 '19': 'Asia/Pontianak',
303 '20': 'Asia/Makassar',
304 '21': 'Asia/Makassar',
305 '22': 'Asia/Makassar',
306 '23': 'Asia/Makassar',
307 '24': 'Asia/Jakarta',
308 '25': 'Asia/Pontianak',
309 '26': 'Asia/Pontianak',
310 '30': 'Asia/Jakarta',
311 '31': 'Asia/Makassar',
312 '33': 'Asia/Jakarta'
313 },
314 'IE': 'Europe/Dublin',
315 'IL': 'Asia/Jerusalem',
316 'IM': 'Europe/Isle_of_Man',
317 'IN': 'Asia/Calcutta',
318 'IO': 'Indian/Chagos',
319 'IQ': 'Asia/Baghdad',
320 'IR': 'Asia/Tehran',
321 'IS': 'Atlantic/Reykjavik',
322 'IT': 'Europe/Rome',
323 'JE': 'Europe/Jersey',
324 'JM': 'America/Jamaica',
325 'JO': 'Asia/Amman',
326 'JP': 'Asia/Tokyo',
327 'KE': 'Africa/Nairobi',
328 'KG': 'Asia/Bishkek',
329 'KH': 'Asia/Phnom_Penh',
330 'KI': 'Pacific/Tarawa',
331 'KM': 'Indian/Comoro',
332 'KN': 'America/St_Kitts',
333 'KP': 'Asia/Pyongyang',
334 'KR': 'Asia/Seoul',
335 'KW': 'Asia/Kuwait',
336 'KY': 'America/Cayman',
337 'KZ': {
338 '01': 'Asia/Almaty',
339 '02': 'Asia/Almaty',
340 '03': 'Asia/Qyzylorda',
341 '04': 'Asia/Aqtobe',
342 '05': 'Asia/Qyzylorda',
343 '06': 'Asia/Aqtau',
344 '07': 'Asia/Oral',
345 '08': 'Asia/Qyzylorda',
346 '09': 'Asia/Aqtau',
347 '10': 'Asia/Qyzylorda',
348 '11': 'Asia/Almaty',
349 '12': 'Asia/Qyzylorda',
350 '13': 'Asia/Aqtobe',
351 '14': 'Asia/Qyzylorda',
352 '15': 'Asia/Almaty',
353 '16': 'Asia/Aqtobe',
354 '17': 'Asia/Almaty'
355 },
356 'LA': 'Asia/Vientiane',
357 'LB': 'Asia/Beirut',
358 'LC': 'America/St_Lucia',
359 'LI': 'Europe/Vaduz',
360 'LK': 'Asia/Colombo',
361 'LR': 'Africa/Monrovia',
362 'LS': 'Africa/Maseru',
363 'LT': 'Europe/Vilnius',
364 'LU': 'Europe/Luxembourg',
365 'LV': 'Europe/Riga',
366 'LY': 'Africa/Tripoli',
367 'MA': 'Africa/Casablanca',
368 'MC': 'Europe/Monaco',
369 'MD': 'Europe/Chisinau',
370 'ME': 'Europe/Podgorica',
371 'MF': 'America/Marigot',
372 'MG': 'Indian/Antananarivo',
373 'MK': 'Europe/Skopje',
374 'ML': 'Africa/Bamako',
375 'MM': 'Asia/Rangoon',
376 'MN': 'Asia/Choibalsan',
377 'MO': 'Asia/Macao',
378 'MP': 'Pacific/Saipan',
379 'MQ': 'America/Martinique',
380 'MR': 'Africa/Nouakchott',
381 'MS': 'America/Montserrat',
382 'MT': 'Europe/Malta',
383 'MU': 'Indian/Mauritius',
384 'MV': 'Indian/Maldives',
385 'MW': 'Africa/Blantyre',
386 'MX': {
387 '01': 'America/Mexico_City',
388 '02': 'America/Tijuana',
389 '03': 'America/Hermosillo',
390 '04': 'America/Merida',
391 '05': 'America/Mexico_City',
392 '06': 'America/Chihuahua',
393 '07': 'America/Monterrey',
394 '08': 'America/Mexico_City',
395 '09': 'America/Mexico_City',
396 '10': 'America/Mazatlan',
397 '11': 'America/Mexico_City',
398 '12': 'America/Mexico_City',
399 '13': 'America/Mexico_City',
400 '14': 'America/Mazatlan',
401 '15': 'America/Chihuahua',
402 '16': 'America/Mexico_City',
403 '17': 'America/Mexico_City',
404 '18': 'America/Mazatlan',
405 '19': 'America/Monterrey',
406 '20': 'America/Mexico_City',
407 '21': 'America/Mexico_City',
408 '22': 'America/Mexico_City',
409 '23': 'America/Cancun',
410 '24': 'America/Mexico_City',
411 '25': 'America/Mazatlan',
412 '26': 'America/Hermosillo',
413 '27': 'America/Merida',
414 '28': 'America/Monterrey',
415 '29': 'America/Mexico_City',
416 '30': 'America/Mexico_City',
417 '31': 'America/Merida',
418 '32': 'America/Monterrey'
419 },
420 'MY': {
421 '01': 'Asia/Kuala_Lumpur',
422 '02': 'Asia/Kuala_Lumpur',
423 '03': 'Asia/Kuala_Lumpur',
424 '04': 'Asia/Kuala_Lumpur',
425 '05': 'Asia/Kuala_Lumpur',
426 '06': 'Asia/Kuala_Lumpur',
427 '07': 'Asia/Kuala_Lumpur',
428 '08': 'Asia/Kuala_Lumpur',
429 '09': 'Asia/Kuala_Lumpur',
430 '11': 'Asia/Kuching',
431 '12': 'Asia/Kuala_Lumpur',
432 '13': 'Asia/Kuala_Lumpur',
433 '14': 'Asia/Kuala_Lumpur',
434 '15': 'Asia/Kuching',
435 '16': 'Asia/Kuching'
436 },
437 'MZ': 'Africa/Maputo',
438 'NA': 'Africa/Windhoek',
439 'NC': 'Pacific/Noumea',
440 'NE': 'Africa/Niamey',
441 'NF': 'Pacific/Norfolk',
442 'NG': 'Africa/Lagos',
443 'NI': 'America/Managua',
444 'NL': 'Europe/Amsterdam',
445 'NO': 'Europe/Oslo',
446 'NP': 'Asia/Katmandu',
447 'NR': 'Pacific/Nauru',
448 'NU': 'Pacific/Niue',
449 'NZ': {
450 '85': 'Pacific/Auckland',
451 'E7': 'Pacific/Auckland',
452 'E8': 'Pacific/Auckland',
453 'E9': 'Pacific/Auckland',
454 'F1': 'Pacific/Auckland',
455 'F2': 'Pacific/Auckland',
456 'F3': 'Pacific/Auckland',
457 'F4': 'Pacific/Auckland',
458 'F5': 'Pacific/Auckland',
459 'F7': 'Pacific/Chatham',
460 'F8': 'Pacific/Auckland',
461 'F9': 'Pacific/Auckland',
462 'G1': 'Pacific/Auckland',
463 'G2': 'Pacific/Auckland',
464 'G3': 'Pacific/Auckland'
465 },
466 'OM': 'Asia/Muscat',
467 'PA': 'America/Panama',
468 'PE': 'America/Lima',
469 'PF': 'Pacific/Marquesas',
470 'PG': 'Pacific/Port_Moresby',
471 'PH': 'Asia/Manila',
472 'PK': 'Asia/Karachi',
473 'PL': 'Europe/Warsaw',
474 'PM': 'America/Miquelon',
475 'PN': 'Pacific/Pitcairn',
476 'PR': 'America/Puerto_Rico',
477 'PS': 'Asia/Gaza',
478 'PT': {
479 '02': 'Europe/Lisbon',
480 '03': 'Europe/Lisbon',
481 '04': 'Europe/Lisbon',
482 '05': 'Europe/Lisbon',
483 '06': 'Europe/Lisbon',
484 '07': 'Europe/Lisbon',
485 '08': 'Europe/Lisbon',
486 '09': 'Europe/Lisbon',
487 '10': 'Atlantic/Madeira',
488 '11': 'Europe/Lisbon',
489 '13': 'Europe/Lisbon',
490 '14': 'Europe/Lisbon',
491 '16': 'Europe/Lisbon',
492 '17': 'Europe/Lisbon',
493 '18': 'Europe/Lisbon',
494 '19': 'Europe/Lisbon',
495 '20': 'Europe/Lisbon',
496 '21': 'Europe/Lisbon',
497 '22': 'Europe/Lisbon'
498 },
499 'PW': 'Pacific/Palau',
500 'PY': 'America/Asuncion',
501 'QA': 'Asia/Qatar',
502 'RE': 'Indian/Reunion',
503 'RO': 'Europe/Bucharest',
504 'RS': 'Europe/Belgrade',
505 'RU': {
506 '01': 'Europe/Volgograd',
507 '02': 'Asia/Irkutsk',
508 '03': 'Asia/Novokuznetsk',
509 '04': 'Asia/Novosibirsk',
510 '05': 'Asia/Vladivostok',
511 '06': 'Europe/Moscow',
512 '07': 'Europe/Volgograd',
513 '08': 'Europe/Samara',
514 '09': 'Europe/Moscow',
515 '10': 'Europe/Moscow',
516 '11': 'Asia/Irkutsk',
517 '13': 'Asia/Yekaterinburg',
518 '14': 'Asia/Irkutsk',
519 '15': 'Asia/Anadyr',
520 '16': 'Europe/Samara',
521 '17': 'Europe/Volgograd',
522 '18': 'Asia/Krasnoyarsk',
523 '20': 'Asia/Irkutsk',
524 '21': 'Europe/Moscow',
525 '22': 'Europe/Volgograd',
526 '23': 'Europe/Kaliningrad',
527 '24': 'Europe/Volgograd',
528 '25': 'Europe/Moscow',
529 '26': 'Asia/Kamchatka',
530 '27': 'Europe/Volgograd',
531 '28': 'Europe/Moscow',
532 '29': 'Asia/Novokuznetsk',
533 '30': 'Asia/Vladivostok',
534 '31': 'Asia/Krasnoyarsk',
535 '32': 'Asia/Omsk',
536 '33': 'Asia/Yekaterinburg',
537 '34': 'Asia/Yekaterinburg',
538 '35': 'Asia/Yekaterinburg',
539 '36': 'Asia/Anadyr',
540 '37': 'Europe/Moscow',
541 '38': 'Europe/Volgograd',
542 '39': 'Asia/Krasnoyarsk',
543 '40': 'Asia/Yekaterinburg',
544 '41': 'Europe/Moscow',
545 '42': 'Europe/Moscow',
546 '43': 'Europe/Moscow',
547 '44': 'Asia/Magadan',
548 '45': 'Europe/Samara',
549 '46': 'Europe/Samara',
550 '47': 'Europe/Moscow',
551 '48': 'Europe/Moscow',
552 '49': 'Europe/Moscow',
553 '50': 'Asia/Yekaterinburg',
554 '51': 'Europe/Moscow',
555 '52': 'Europe/Moscow',
556 '53': 'Asia/Novosibirsk',
557 '54': 'Asia/Omsk',
558 '55': 'Europe/Samara',
559 '56': 'Europe/Moscow',
560 '57': 'Europe/Samara',
561 '58': 'Asia/Yekaterinburg',
562 '59': 'Asia/Vladivostok',
563 '60': 'Europe/Kaliningrad',
564 '61': 'Europe/Volgograd',
565 '62': 'Europe/Moscow',
566 '63': 'Asia/Yakutsk',
567 '64': 'Asia/Sakhalin',
568 '65': 'Europe/Samara',
569 '66': 'Europe/Moscow',
570 '67': 'Europe/Samara',
571 '68': 'Europe/Volgograd',
572 '69': 'Europe/Moscow',
573 '70': 'Europe/Volgograd',
574 '71': 'Asia/Yekaterinburg',
575 '72': 'Europe/Moscow',
576 '73': 'Europe/Samara',
577 '74': 'Asia/Krasnoyarsk',
578 '75': 'Asia/Novosibirsk',
579 '76': 'Europe/Moscow',
580 '77': 'Europe/Moscow',
581 '78': 'Asia/Yekaterinburg',
582 '79': 'Asia/Irkutsk',
583 '80': 'Asia/Yekaterinburg',
584 '81': 'Europe/Samara',
585 '82': 'Asia/Irkutsk',
586 '83': 'Europe/Moscow',
587 '84': 'Europe/Volgograd',
588 '85': 'Europe/Moscow',
589 '86': 'Europe/Moscow',
590 '87': 'Asia/Novosibirsk',
591 '88': 'Europe/Moscow',
592 '89': 'Asia/Vladivostok'
593 },
594 'RW': 'Africa/Kigali',
595 'SA': 'Asia/Riyadh',
596 'SB': 'Pacific/Guadalcanal',
597 'SC': 'Indian/Mahe',
598 'SD': 'Africa/Khartoum',
599 'SE': 'Europe/Stockholm',
600 'SG': 'Asia/Singapore',
601 'SH': 'Atlantic/St_Helena',
602 'SI': 'Europe/Ljubljana',
603 'SJ': 'Arctic/Longyearbyen',
604 'SK': 'Europe/Bratislava',
605 'SL': 'Africa/Freetown',
606 'SM': 'Europe/San_Marino',
607 'SN': 'Africa/Dakar',
608 'SO': 'Africa/Mogadishu',
609 'SR': 'America/Paramaribo',
610 'SS': 'Africa/Juba',
611 'ST': 'Africa/Sao_Tome',
612 'SV': 'America/El_Salvador',
613 'SX': 'America/Curacao',
614 'SY': 'Asia/Damascus',
615 'SZ': 'Africa/Mbabane',
616 'TC': 'America/Grand_Turk',
617 'TD': 'Africa/Ndjamena',
618 'TF': 'Indian/Kerguelen',
619 'TG': 'Africa/Lome',
620 'TH': 'Asia/Bangkok',
621 'TJ': 'Asia/Dushanbe',
622 'TK': 'Pacific/Fakaofo',
623 'TL': 'Asia/Dili',
624 'TM': 'Asia/Ashgabat',
625 'TN': 'Africa/Tunis',
626 'TO': 'Pacific/Tongatapu',
627 'TR': 'Asia/Istanbul',
628 'TT': 'America/Port_of_Spain',
629 'TV': 'Pacific/Funafuti',
630 'TW': 'Asia/Taipei',
631 'TZ': 'Africa/Dar_es_Salaam',
632 'UA': {
633 '01': 'Europe/Kiev',
634 '02': 'Europe/Kiev',
635 '03': 'Europe/Uzhgorod',
636 '04': 'Europe/Zaporozhye',
637 '05': 'Europe/Zaporozhye',
638 '06': 'Europe/Uzhgorod',
639 '07': 'Europe/Zaporozhye',
640 '08': 'Europe/Simferopol',
641 '09': 'Europe/Kiev',
642 '10': 'Europe/Zaporozhye',
643 '11': 'Europe/Simferopol',
644 '13': 'Europe/Kiev',
645 '14': 'Europe/Zaporozhye',
646 '15': 'Europe/Uzhgorod',
647 '16': 'Europe/Zaporozhye',
648 '17': 'Europe/Simferopol',
649 '18': 'Europe/Zaporozhye',
650 '19': 'Europe/Kiev',
651 '20': 'Europe/Simferopol',
652 '21': 'Europe/Kiev',
653 '22': 'Europe/Uzhgorod',
654 '23': 'Europe/Kiev',
655 '24': 'Europe/Uzhgorod',
656 '25': 'Europe/Uzhgorod',
657 '26': 'Europe/Zaporozhye',
658 '27': 'Europe/Kiev'
659 },
660 'UG': 'Africa/Kampala',
661 'US': {
662 'AK': 'America/Anchorage',
663 'AL': 'America/Chicago',
664 'AR': 'America/Chicago',
665 'AZ': 'America/Phoenix',
666 'CA': 'America/Los_Angeles',
667 'CO': 'America/Denver',
668 'CT': 'America/New_York',
669 'DC': 'America/New_York',
670 'DE': 'America/New_York',
671 'FL': 'America/New_York',
672 'GA': 'America/New_York',
673 'HI': 'Pacific/Honolulu',
674 'IA': 'America/Chicago',
675 'ID': 'America/Denver',
676 'IL': 'America/Chicago',
677 'IN': 'America/Indianapolis',
678 'KS': 'America/Chicago',
679 'KY': 'America/New_York',
680 'LA': 'America/Chicago',
681 'MA': 'America/New_York',
682 'MD': 'America/New_York',
683 'ME': 'America/New_York',
684 'MI': 'America/New_York',
685 'MN': 'America/Chicago',
686 'MO': 'America/Chicago',
687 'MS': 'America/Chicago',
688 'MT': 'America/Denver',
689 'NC': 'America/New_York',
690 'ND': 'America/Chicago',
691 'NE': 'America/Chicago',
692 'NH': 'America/New_York',
693 'NJ': 'America/New_York',
694 'NM': 'America/Denver',
695 'NV': 'America/Los_Angeles',
696 'NY': 'America/New_York',
697 'OH': 'America/New_York',
698 'OK': 'America/Chicago',
699 'OR': 'America/Los_Angeles',
700 'PA': 'America/New_York',
701 'RI': 'America/New_York',
702 'SC': 'America/New_York',
703 'SD': 'America/Chicago',
704 'TN': 'America/Chicago',
705 'TX': 'America/Chicago',
706 'UT': 'America/Denver',
707 'VA': 'America/New_York',
708 'VT': 'America/New_York',
709 'WA': 'America/Los_Angeles',
710 'WI': 'America/Chicago',
711 'WV': 'America/New_York',
712 'WY': 'America/Denver'
713 },
714 'UY': 'America/Montevideo',
715 'UZ': {
716 '01': 'Asia/Tashkent',
717 '02': 'Asia/Samarkand',
718 '03': 'Asia/Tashkent',
719 '06': 'Asia/Tashkent',
720 '07': 'Asia/Samarkand',
721 '08': 'Asia/Samarkand',
722 '09': 'Asia/Samarkand',
723 '10': 'Asia/Samarkand',
724 '12': 'Asia/Samarkand',
725 '13': 'Asia/Tashkent',
726 '14': 'Asia/Tashkent'
727 },
728 'VA': 'Europe/Vatican',
729 'VC': 'America/St_Vincent',
730 'VE': 'America/Caracas',
731 'VG': 'America/Tortola',
732 'VI': 'America/St_Thomas',
733 'VN': 'Asia/Phnom_Penh',
734 'VU': 'Pacific/Efate',
735 'WF': 'Pacific/Wallis',
736 'WS': 'Pacific/Samoa',
737 'YE': 'Asia/Aden',
738 'YT': 'Indian/Mayotte',
739 'YU': 'Europe/Belgrade',
740 'ZA': 'Africa/Johannesburg',
741 'ZM': 'Africa/Lusaka',
742 'ZW': 'Africa/Harare'
743 }
744
745
746 def time_zone_by_country_and_region(country_code, region_name=None):
747 if country_code not in _country:
748 return ''
749
750 if not region_name or region_name == '00':
751 region_name = None
752
753 timezones = _country[country_code]
754 if isinstance(timezones, str):
755 return timezones
756
757 if not region_name:
758 return ''
759
760 return timezones.get(region_name)
OLDNEW
« no previous file with comments | « pygeoip/const.py ('k') | pygeoip/util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld