module RailsClientTimezone # ActiveSupport class for mapping tz info identifiers to rails identifiers class ActiveSupportExt TIMEZONE_MAPPING = { "Pacific/Midway"=>"International Date Line West", "Pacific/Honolulu"=>"Hawaii", "America/Juneau"=>"Alaska", "America/Los_Angeles"=>"Pacific Time (US & Canada)", "America/Tijuana"=>"Tijuana", "America/Denver"=>"Mountain Time (US & Canada)", "America/Phoenix"=>"Arizona", "America/Chihuahua"=>"Chihuahua", "America/Mazatlan"=>"Mazatlan", "America/Chicago"=>"Central Time (US & Canada)", "America/Regina"=>"Saskatchewan", "America/Mexico_City"=>"Mexico City", "America/Monterrey"=>"Monterrey", "America/Guatemala"=>"Central America", "America/New_York"=>"Eastern Time (US & Canada)", "America/Indianapolis"=>"Indiana (East)", "America/Indiana/Indianapolis"=>"Indiana (East)", "America/Bogota"=>"Bogota", "America/Lima"=>"Quito", "America/Halifax"=>"Atlantic Time (Canada)", "America/Caracas"=>"Caracas", "America/La_Paz"=>"La Paz", "America/Santiago"=>"Santiago", "America/Santo_Domingo"=>"Santiago", "America/St_Johns"=>"Newfoundland", "America/Sao_Paulo"=>"Brasilia", "America/Argentina/Buenos_Aires"=>"Buenos Aires", "America/Montevideo"=>"Montevideo", "America/Argentina/San_Juan"=>"Georgetown", "America/Guyana"=>"Georgetown", "America/Godthab"=>"Greenland", "Atlantic/South_Georgia"=>"Mid-Atlantic", "Atlantic/Azores"=>"Azores", "Atlantic/Cape_Verde"=>"Cape Verde Is.", "Europe/Dublin"=>"Dublin", "Europe/London"=>"London", "Europe/Lisbon"=>"Lisbon", "Africa/Casablanca"=>"Casablanca", "Africa/Monrovia"=>"Monrovia", "Etc/UTC"=>"UTC", "Europe/Belgrade"=>"Belgrade", "Europe/Bratislava"=>"Bratislava", "Europe/Budapest"=>"Budapest", "Europe/Ljubljana"=>"Ljubljana", "Europe/Prague"=>"Prague", "Europe/Sarajevo"=>"Sarajevo", "Europe/Skopje"=>"Skopje", "Europe/Warsaw"=>"Warsaw", "Europe/Zagreb"=>"Zagreb", "Europe/Brussels"=>"Brussels", "Europe/Copenhagen"=>"Copenhagen", "Europe/Madrid"=>"Madrid", "Europe/Paris"=>"Paris", "Europe/Amsterdam"=>"Amsterdam", "Europe/Berlin"=>"Bern", "Europe/Rome"=>"Rome", "Europe/Stockholm"=>"Stockholm", "Europe/Vienna"=>"Vienna", "Africa/Algiers"=>"West Central Africa", "Europe/Bucharest"=>"Bucharest", "Africa/Cairo"=>"Cairo", "Africa/Kinshasa"=>"West Central Africa", "Europe/Helsinki"=>"Helsinki", "Europe/Kiev"=>"Kyev", "Europe/Riga"=>"Riga", "Europe/Sofia"=>"Sofia", "Europe/Tallinn"=>"Tallinn", "Europe/Vilnius"=>"Vilnius", "Europe/Athens"=>"Athens", "Europe/Istanbul"=>"Istanbul", "Europe/Minsk"=>"Minsk", "Asia/Jerusalem"=>"Jerusalem", "Africa/Harare"=>"Harare", "Africa/Johannesburg"=>"Pretoria", "Europe/Kaliningrad"=>"Kaliningrad", "Europe/Moscow"=>"Moscow", "Europe/Volgograd"=>"Volgograd", "Europe/Samara"=>"Samara", "Asia/Kuwait"=>"Kuwait", "Asia/Riyadh"=>"Riyadh", "Africa/Nairobi"=>"Nairobi", "Asia/Baghdad"=>"Baghdad", "Asia/Tehran"=>"Tehran", "Asia/Muscat"=>"Abu Dhabi", "Asia/Baku"=>"Baku", "Asia/Tbilisi"=>"Tbilisi", "Asia/Yerevan"=>"Yerevan", "Asia/Kabul"=>"Kabul", "Asia/Yekaterinburg"=>"Ekaterinburg", "Asia/Karachi"=>"Karachi", "Asia/Tashkent"=>"Tashkent", "Asia/Kolkata"=>"Chennai", "Asia/Calcutta"=>"New Delhi", "Asia/Kathmandu"=>"Kathmandu", "Asia/Katmandu"=>"Kathmandu", "Asia/Dhaka"=>"Dhaka", "Asia/Colombo"=>"Sri Jayawardenepura", "Asia/Almaty"=>"Almaty", "Asia/Qyzylorda"=>"Almaty", "Asia/Novosibirsk"=>"Novosibirsk", "Asia/Bangkok"=>"Bangkok", "Asia/Jakarta"=>"Jakarta", "Asia/Krasnoyarsk"=>"Krasnoyarsk", "Asia/Shanghai"=>"Beijing", "Asia/Chongqing"=>"Chongqing", "Asia/Hong_Kong"=>"Hong Kong", "Asia/Urumqi"=>"Urumqi", "Asia/Kuala_Lumpur"=>"Kuala Lumpur", "Asia/Rangoon"=>"Rangoon", "Asia/Singapore"=>"Singapore", "Asia/Taipei"=>"Taipei", "Asia/Irkutsk"=>"Irkutsk", "Asia/Ulaanbaatar"=>"Ulaanbaatar", "Asia/Seoul"=>"Seoul", "Asia/Tokyo"=>"Tokyo", "Asia/Yakutsk"=>"Yakutsk", "Australia/Darwin"=>"Darwin", "Australia/Adelaide"=>"Adelaide", "Australia/Melbourne"=>"Melbourne", "Australia/Lord_Howe"=>"Melbourne", "Australia/Queensland"=>"Brisbane", "Australia/Victoria"=>"Melbourne", "Australia/NSW"=>"Melbourne", "Australia/Sydney"=>"Sydney", "Australia/Brisbane"=>"Brisbane", "Australia/Hobart"=>"Hobart", "Australia/Currie"=>"Melbourne", "Australia/Broken_Hill"=>"Adelaide", "Australia/Lindeman"=>"Brisbane", "Australia/Perth"=>"Perth", "Australia/Eucla"=>"Perth", "Asia/Vladivostok"=>"Vladivostok", "Pacific/Guam"=>"Guam", "Pacific/Port_Moresby"=>"Port Moresby", "Asia/Magadan"=>"Magadan", "Asia/Srednekolymsk"=>"Srednekolymsk", "Pacific/Guadalcanal"=>"Solomon Is.", "Pacific/Noumea"=>"New Caledonia", "Pacific/Fiji"=>"Fiji", "Asia/Kamchatka"=>"Kamchatka", "Pacific/Majuro"=>"Marshall Is.", "Pacific/Auckland"=>"Auckland", "Pacific/Tongatapu"=>"Nuku'alofa", "Pacific/Fakaofo"=>"Tokelau Is.", "Pacific/Chatham"=>"Chatham Is.", "Pacific/Pago_Pago"=>"Samoa", "Pacific/Galapagos"=>"Samoa", "Pacific/Apia"=>"Samoa" } def self.format(zone) TIMEZONE_MAPPING[zone] || nil end end end