<?php
	
	namespace IfSo\PublicFace\Services\TimezonesService;

	class TimezonesService {
		private static $instance;

		private $timezones;

		private function __construct() {
			$this->timezones = array("(UTC-12:00) International Date Line West" => array("Etc/GMT+12"), "(UTC-11:00) Coordinated Universal Time-11" => array("Etc/GMT+11", "Pacific/Midway", "Pacific/Niue", "Pacific/Pago_Pago"), "(UTC-10:00) Hawaii" => array("Etc/GMT+10", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Rarotonga", "Pacific/Tahiti"), "(UTC-09:00) Alaska" => array("America/Anchorage", "America/Juneau", "America/Nome", "America/Sitka", "America/Yakutat"), "(UTC-08:00) Baja California" => array("America/Santa_Isabel"), "(UTC-08:00) Pacific Time (US & Canada)" => array("America/Dawson", "America/Los_Angeles", "America/Tijuana", "America/Vancouver", "America/Whitehorse", "PST8PDT"), "(UTC-07:00) Arizona" => array("America/Creston", "America/Dawson_Creek", "America/Hermosillo", "America/Phoenix", "Etc/GMT+7"), "(UTC-07:00) Chihuahua, La Paz, Mazatlan" => array("America/Chihuahua", "America/Mazatlan"), "(UTC-07:00) Mountain Time (US & Canada)" => array("America/Boise", "America/Cambridge_Bay", "America/Denver", "America/Edmonton", "America/Inuvik", "America/Ojinaga", "America/Yellowknife", "MST7MDT"), "(UTC-06:00) Central America" => array("America/Belize", "America/Costa_Rica", "America/El_Salvador", "America/Guatemala", "America/Managua", "America/Tegucigalpa", "Etc/GMT+6", "Pacific/Galapagos"), "(UTC-06:00) Central Time (US & Canada)" => array("America/Chicago", "America/Indiana/Knox", "America/Indiana/Tell_City", "America/Matamoros", "America/Menominee", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Rainy_River", "America/Rankin_Inlet", "America/Resolute", "America/Winnipeg", "CST6CDT"), "(UTC-06:00) Guadalajara, Mexico City, Monterrey" => array("America/Bahia_Banderas", "America/Cancun", "America/Merida", "America/Mexico_City", "America/Monterrey"), "(UTC-06:00) Saskatchewan" => array("America/Regina", "America/Swift_Current"), "(UTC-05:00) Bogota, Lima, Quito" => array("America/Bogota", "America/Cayman", "America/Coral_Harbour", "America/Eirunepe", "America/Guayaquil", "America/Jamaica", "America/Lima", "America/Panama", "America/Rio_Branco", "Etc/GMT+5"), "(UTC-05:00) Eastern Time (US & Canada)" => array("America/Detroit", "America/Havana", "America/Indiana/Petersburg", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Iqaluit", "America/Kentucky/Monticello", "America/Louisville", "America/Montreal", "America/Nassau", "America/New_York", "America/Nipigon", "America/Pangnirtung", "America/Port-au-Prince", "America/Thunder_Bay", "America/Toronto", "EST5EDT"), "(UTC-05:00) Indiana (East)" => array("America/Indiana/Marengo", "America/Indiana/Vevay", "America/Indianapolis"), "(UTC-04:30) Caracas" => array("America/Caracas"), "(UTC-04:00) Asuncion" => array("America/Asuncion"), "(UTC-04:00) Atlantic Time (Canada)" => array("America/Glace_Bay", "America/Goose_Bay", "America/Halifax", "America/Moncton", "America/Thule", "Atlantic/Bermuda"), "(UTC-04:00) Cuiaba" => array("America/Campo_Grande", "America/Cuiaba"), "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan" => array("America/Anguilla", "America/Antigua", "America/Aruba", "America/Barbados", "America/Blanc-Sablon", "America/Boa_Vista", "America/Curacao", "America/Dominica", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guyana", "America/Kralendijk", "America/La_Paz", "America/Lower_Princes", "America/Manaus", "America/Marigot", "America/Martinique", "America/Montserrat", "America/Port_of_Spain", "America/Porto_Velho", "America/Puerto_Rico", "America/Santo_Domingo", "America/St_Barthelemy", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Tortola", "Etc/GMT+4"), "(UTC-04:00) Santiago" => array("America/Santiago", "Antarctica/Palmer"), "(UTC-03:30) Newfoundland" => array("America/St_Johns"), "(UTC-03:00) Brasilia" => array("America/Sao_Paulo"), "(UTC-03:00) Buenos Aires" => array("America/Argentina/La_Rioja", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Buenos_Aires", "America/Catamarca", "America/Cordoba", "America/Jujuy", "America/Mendoza"), "(UTC-03:00) Cayenne, Fortaleza" => array("America/Araguaina", "America/Belem", "America/Cayenne", "America/Fortaleza", "America/Maceio", "America/Paramaribo", "America/Recife", "America/Santarem", "Antarctica/Rothera", "Atlantic/Stanley", "Etc/GMT+3"), "(UTC-03:00) Greenland" => array("America/Godthab"), "(UTC-03:00) Montevideo" => array("America/Montevideo"), "(UTC-03:00) Salvador" => array("America/Bahia"), "(UTC-02:00) Coordinated Universal Time-02" => array("America/Noronha", "Atlantic/South_Georgia", "Etc/GMT+2"), "(UTC-02:00) Mid-Atlantic - Old" => array(), "(UTC-01:00) Azores" => array("America/Scoresbysund", "Atlantic/Azores"), "(UTC-01:00) Cape Verde Is." => array("Atlantic/Cape_Verde", "Etc/GMT+1"), "(UTC) Casablanca" => array("Africa/Casablanca", "Africa/El_Aaiun"), "(UTC) Coordinated Universal Time" => array("America/Danmarkshavn", "Etc/GMT"), "(UTC) Dublin, Edinburgh, Lisbon, London" => array("Atlantic/Canary", "Atlantic/Faeroe", "Atlantic/Madeira", "Europe/Dublin", "Europe/Guernsey", "Europe/Isle_of_Man", "Europe/Jersey", "Europe/Lisbon", "Europe/London"), "(UTC) Monrovia, Reykjavik" => array("Africa/Abidjan", "Africa/Accra", "Africa/Bamako", "Africa/Banjul", "Africa/Bissau", "Africa/Conakry", "Africa/Dakar", "Africa/Freetown", "Africa/Lome", "Africa/Monrovia", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Sao_Tome", "Atlantic/Reykjavik", "Atlantic/St_Helena"), "(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" => array("Arctic/Longyearbyen", "Europe/Amsterdam", "Europe/Andorra", "Europe/Berlin", "Europe/Busingen", "Europe/Gibraltar", "Europe/Luxembourg", "Europe/Malta", "Europe/Monaco", "Europe/Oslo", "Europe/Rome", "Europe/San_Marino", "Europe/Stockholm", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Zurich"), "(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague" => array("Europe/Belgrade", "Europe/Bratislava", "Europe/Budapest", "Europe/Ljubljana", "Europe/Podgorica", "Europe/Prague", "Europe/Tirane"), "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris" => array("Africa/Ceuta", "Europe/Brussels", "Europe/Copenhagen", "Europe/Madrid", "Europe/Paris"), "(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb" => array("Europe/Sarajevo", "Europe/Skopje", "Europe/Warsaw", "Europe/Zagreb"), "(UTC+01:00) West Central Africa" => array("Africa/Algiers", "Africa/Bangui", "Africa/Brazzaville", "Africa/Douala", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Luanda", "Africa/Malabo", "Africa/Ndjamena", "Africa/Niamey", "Africa/Porto-Novo", "Africa/Tunis", "Etc/GMT-1"), "(UTC+01:00) Windhoek" => array("Africa/Windhoek"), "(UTC+02:00) Athens, Bucharest" => array("Asia/Nicosia", "Europe/Athens", "Europe/Bucharest", "Europe/Chisinau"), "(UTC+02:00) Beirut" => array("Asia/Beirut"), "(UTC+02:00) Cairo" => array("Africa/Cairo"), "(UTC+02:00) Damascus" => array("Asia/Damascus"), "(UTC+02:00) E. Europe" => array("Asia/Nicosia", "Europe/Athens", "Europe/Bucharest", "Europe/Chisinau", "Europe/Helsinki", "Europe/Kiev", "Europe/Mariehamn", "Europe/Nicosia", "Europe/Riga", "Europe/Sofia", "Europe/Tallinn", "Europe/Uzhgorod", "Europe/Vilnius", "Europe/Zaporozhye"), "(UTC+02:00) Harare, Pretoria" => array("Africa/Blantyre", "Africa/Bujumbura", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Kigali", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Etc/GMT-2"), "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius" => array("Europe/Helsinki", "Europe/Kiev", "Europe/Mariehamn", "Europe/Riga", "Europe/Sofia", "Europe/Tallinn", "Europe/Uzhgorod", "Europe/Vilnius", "Europe/Zaporozhye"), "(UTC+03:00) Istanbul" => array("Europe/Istanbul"), "(UTC+02:00) Jerusalem" => array("Asia/Jerusalem"), "(UTC+02:00) Tripoli" => array("Africa/Tripoli"), "(UTC+03:00) Amman" => array("Asia/Amman"), "(UTC+03:00) Baghdad" => array("Asia/Baghdad"), "(UTC+03:00) Kaliningrad, Minsk" => array("Europe/Kaliningrad", "Europe/Minsk"), "(UTC+03:00) Kuwait, Riyadh" => array("Asia/Aden", "Asia/Bahrain", "Asia/Kuwait", "Asia/Qatar", "Asia/Riyadh"), "(UTC+03:00) Nairobi" => array("Africa/Addis_Ababa", "Africa/Asmera", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Mogadishu", "Africa/Nairobi", "Antarctica/Syowa", "Etc/GMT-3", "Indian/Antananarivo", "Indian/Comoro", "Indian/Mayotte"), "(UTC+03:00) Moscow, St. Petersburg, Volgograd" => array("Europe/Kirov", "Europe/Moscow", "Europe/Simferopol", "Europe/Volgograd"), "(UTC+04:00) Samara, Ulyanovsk, Saratov" => array("Europe/Astrakhan", "Europe/Samara", "Europe/Ulyanovsk"), "(UTC+03:30) Tehran" => array("Asia/Tehran"), "(UTC+04:00) Abu Dhabi, Muscat" => array("Asia/Dubai", "Asia/Muscat", "Etc/GMT-4"), "(UTC+04:00) Baku" => array("Asia/Baku"), "(UTC+04:00) Port Louis" => array("Indian/Mahe", "Indian/Mauritius", "Indian/Reunion"), "(UTC+04:00) Tbilisi" => array("Asia/Tbilisi"), "(UTC+04:00) Yerevan" => array("Asia/Yerevan"), "(UTC+04:30) Kabul" => array("Asia/Kabul"), "(UTC+05:00) Ashgabat, Tashkent" => array("Antarctica/Mawson", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Dushanbe", "Asia/Oral", "Asia/Samarkand", "Asia/Tashkent", "Etc/GMT-5", "Indian/Kerguelen", "Indian/Maldives"), "(UTC+05:00) Islamabad, Karachi" => array("Asia/Karachi"), "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi" => array("Asia/Kolkata"), "(UTC+05:30) Sri Jayawardenepura" => array("Asia/Colombo"), "(UTC+05:45) Kathmandu" => array("Asia/Katmandu"), "(UTC+06:00) Astana" => array("Antarctica/Vostok", "Asia/Almaty", "Asia/Bishkek", "Asia/Qyzylorda", "Asia/Urumqi", "Etc/GMT-6", "Indian/Chagos"), "(UTC+06:00) Dhaka" => array("Asia/Dhaka", "Asia/Thimphu"), "(UTC+06:00) Ekaterinburg" => array("Asia/Yekaterinburg"), "(UTC+06:30) Yangon (Rangoon)" => array("Asia/Rangoon", "Indian/Cocos"), "(UTC+07:00) Bangkok, Hanoi, Jakarta" => array("Antarctica/Davis", "Asia/Bangkok", "Asia/Hovd", "Asia/Jakarta", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Saigon", "Asia/Vientiane", "Etc/GMT-7", "Indian/Christmas"), "(UTC+07:00) Novosibirsk" => array("Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk"), "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi" => array("Asia/Hong_Kong", "Asia/Macau", "Asia/Shanghai"), "(UTC+08:00) Krasnoyarsk" => array("Asia/Krasnoyarsk"), "(UTC+08:00) Kuala Lumpur, Singapore" => array("Asia/Brunei", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Makassar", "Asia/Manila", "Asia/Singapore", "Etc/GMT-8"), "(UTC+08:00) Perth" => array("Antarctica/Casey", "Australia/Perth"), "(UTC+08:00) Taipei" => array("Asia/Taipei"), "(UTC+08:00) Ulaanbaatar" => array("Asia/Choibalsan", "Asia/Ulaanbaatar"), "(UTC+09:00) Irkutsk" => array("Asia/Irkutsk"), "(UTC+09:00) Osaka, Sapporo, Tokyo" => array("Asia/Dili", "Asia/Jayapura", "Asia/Tokyo", "Etc/GMT-9", "Pacific/Palau"), "(UTC+09:00) Seoul" => array("Asia/Pyongyang", "Asia/Seoul"), "(UTC+09:30) Adelaide" => array("Australia/Adelaide", "Australia/Broken_Hill"), "(UTC+09:30) Darwin" => array("Australia/Darwin"), "(UTC+10:00) Brisbane" => array("Australia/Brisbane", "Australia/Lindeman"), "(UTC+10:00) Canberra, Melbourne, Sydney" => array("Australia/Melbourne", "Australia/Sydney"), "(UTC+10:00) Guam, Port Moresby" => array("Antarctica/DumontDUrville", "Etc/GMT-10", "Pacific/Guam", "Pacific/Port_Moresby", "Pacific/Saipan", "Pacific/Truk"), "(UTC+10:00) Hobart" => array("Australia/Currie", "Australia/Hobart"), "(UTC+10:00) Yakutsk" => array("Asia/Chita", "Asia/Khandyga", "Asia/Yakutsk"), "(UTC+11:00) Solomon Is., New Caledonia" => array("Antarctica/Macquarie", "Etc/GMT-11", "Pacific/Efate", "Pacific/Guadalcanal", "Pacific/Kosrae", "Pacific/Noumea", "Pacific/Ponape"), "(UTC+11:00) Vladivostok" => array("Asia/Sakhalin", "Asia/Ust-Nera", "Asia/Vladivostok"), "(UTC+12:00) Auckland, Wellington" => array("Antarctica/McMurdo", "Pacific/Auckland"), "(UTC+12:00) Coordinated Universal Time+12" => array("Etc/GMT-12", "Pacific/Funafuti", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Nauru", "Pacific/Tarawa", "Pacific/Wake", "Pacific/Wallis"), "(UTC+12:00) Fiji" => array("Pacific/Fiji"), "(UTC+12:00) Magadan" => array("Asia/Anadyr", "Asia/Kamchatka", "Asia/Magadan", "Asia/Srednekolymsk"), "(UTC+12:00) Petropavlovsk-Kamchatsky - Old" => array("Asia/Kamchatka"), "(UTC+13:00) Nuku'alofa" => array("Etc/GMT-13", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Tongatapu"), "(UTC+13:00) Samoa" => array("Pacific/Apia") );
		}

		public static function get_instance() {
			if ( NULL == self::$instance )
				self::$instance = new TimezonesService();

			return self::$instance;
		}

		public function get_timezone_utcs($timezone_name) {
			$utcs = null;

			if ( isset( $this->timezones[$timezone_name] ) )
				$utcs = $this->timezones[$timezone_name];

			return $utcs;
		}

	}