TimeZone Places

RJM Programming - December, 2016

Thanks to http://php.net/manual/en/datetimezone.getlocation.php and
http://stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name and
http://php.net/manual/en/function.timezone-identifiers-list.php and
http://www.timezoneconverter.com/

"; for ($ii=2; $ii<10; $ii++) { $hsuffix.="+" . $ii . ""; } $hsuffix.="
"; $fromto="  "; $onloadbits=" setTimeout(checkmailbox,3000); "; } else if ($iam == "1") { $hprefix="

TimeZone Places

RJM Programming - December, 2016

Thanks to http://php.net/manual/en/datetimezone.getlocation.php and
http://stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name and
http://php.net/manual/en/function.timezone-identifiers-list.php and
http://www.timezoneconverter.com/

" . "
"; for ($ii=2; $ii<10; $ii++) { $hsuffix.="+" . $ii . ""; } $hsuffix.="
"; $fromto="  "; $onloadbits=" setTimeout(checkmailbox,3000); "; } else { $hprefix=""; //"
"; $hsuffix=""; //"+" . $nextis . "
"; } $iso_country_codes=['AF','Afghanistan', 'AX','Aland Islands', 'AL','Albania', 'DZ','Algeria', 'AS','American Samoa', 'AD','Andorra', 'AO','Angola', 'AI','Anguilla', 'AQ','Antarctica', 'AG','Antigua and Barbuda', 'AR','Argentina', 'AM','Armenia', 'AW','Aruba', 'AU','Australia', 'AT','Austria', 'AZ','Azerbaijan', 'BS','Bahamas the', 'BH','Bahrain', 'BD','Bangladesh', 'BB','Barbados', 'BY','Belarus', 'BE','Belgium', 'BZ','Belize', 'BJ','Benin', 'BM','Bermuda', 'BT','Bhutan', 'BO','Bolivia', 'BA','Bosnia and Herzegovina', 'BW','Botswana', 'BV','Bouvet Island (Bouvetoya)', 'BR','Brazil', 'IO','British Indian Ocean Territory (Chagos Archipelago)', 'VG','British Virgin Islands', 'BN','Brunei Darussalam', 'BG','Bulgaria', 'BF','Burkina Faso', 'BI','Burundi', 'KH','Cambodia', 'CM','Cameroon', 'CA','Canada', 'CV','Cape Verde', 'KY','Cayman Islands', 'CF','Central African Republic', 'TD','Chad', 'CL','Chile', 'CN','China', 'CX','Christmas Island', 'CC','Cocos (Keeling) Islands', 'CO','Colombia', 'KM','Comoros the', 'CD','Congo', 'CG','Congo the', 'CK','Cook Islands', 'CR','Costa Rica', 'CI','Cote d\'Ivoire', 'HR','Croatia', 'CU','Cuba', 'CY','Cyprus', 'CZ','Czech Republic', 'DK','Denmark', 'DJ','Djibouti', 'DM','Dominica', 'DO','Dominican Republic', 'EC','Ecuador', 'EG','Egypt', 'SV','El Salvador', 'GQ','Equatorial Guinea', 'ER','Eritrea', 'EE','Estonia', 'ET','Ethiopia', 'FO','Faroe Islands', 'FK','Falkland Islands (Malvinas)', 'FJ','Fiji the Fiji Islands', 'FI','Finland', 'FR','France, French Republic', 'GF','French Guiana', 'PF','French Polynesia', 'TF','French Southern Territories', 'GA','Gabon', 'GM','Gambia the', 'GE','Georgia', 'DE','Germany', 'GH','Ghana', 'GI','Gibraltar', 'GR','Greece', 'GL','Greenland', 'GD','Grenada', 'GP','Guadeloupe', 'GU','Guam', 'GT','Guatemala', 'GG','Guernsey', 'GN','Guinea', 'GW','Guinea-Bissau', 'GY','Guyana', 'HT','Haiti', 'HM','Heard Island and McDonald Islands', 'VA','Holy See (Vatican City State)', 'HN','Honduras', 'HK','Hong Kong', 'HU','Hungary', 'IS','Iceland', 'IN','India', 'ID','Indonesia', 'IR','Iran', 'IQ','Iraq', 'IE','Ireland', 'IM','Isle of Man', 'IL','Israel', 'IT','Italy', 'JM','Jamaica', 'JP','Japan', 'JE','Jersey', 'JO','Jordan', 'KZ','Kazakhstan', 'KE','Kenya', 'KI','Kiribati', 'KP','Korea', 'KR','Korea', 'KW','Kuwait', 'KG','Kyrgyz Republic', 'LA','Lao', 'LV','Latvia', 'LB','Lebanon', 'LS','Lesotho', 'LR','Liberia', 'LY','Libyan Arab Jamahiriya', 'LI','Liechtenstein', 'LT','Lithuania', 'LU','Luxembourg', 'MO','Macao', 'MK','Macedonia', 'MG','Madagascar', 'MW','Malawi', 'MY','Malaysia', 'MV','Maldives', 'ML','Mali', 'MT','Malta', 'MH','Marshall Islands', 'MQ','Martinique', 'MR','Mauritania', 'MU','Mauritius', 'YT','Mayotte', 'MX','Mexico', 'FM','Micronesia', 'MD','Moldova', 'MC','Monaco', 'MN','Mongolia', 'ME','Montenegro', 'MS','Montserrat', 'MA','Morocco', 'MZ','Mozambique', 'MM','Myanmar', 'NA','Namibia', 'NR','Nauru', 'NP','Nepal', 'AN','Netherlands Antilles', 'NL','Netherlands the', 'NC','New Caledonia', 'NZ','New Zealand', 'NI','Nicaragua', 'NE','Niger', 'NG','Nigeria', 'NU','Niue', 'NF','Norfolk Island', 'MP','Northern Mariana Islands', 'NO','Norway', 'OM','Oman', 'PK','Pakistan', 'PW','Palau', 'PS','Palestinian Territory', 'PA','Panama', 'PG','Papua New Guinea', 'PY','Paraguay', 'PE','Peru', 'PH','Philippines', 'PN','Pitcairn Islands', 'PL','Poland', 'PT','Portugal, Portuguese Republic', 'PR','Puerto Rico', 'QA','Qatar', 'RE','Reunion', 'RO','Romania', 'RU','Russian Federation', 'RW','Rwanda', 'BL','Saint Barthelemy', 'SH','Saint Helena', 'KN','Saint Kitts and Nevis', 'LC','Saint Lucia', 'MF','Saint Martin', 'PM','Saint Pierre and Miquelon', 'VC','Saint Vincent and the Grenadines', 'WS','Samoa', 'SM','San Marino', 'ST','Sao Tome and Principe', 'SA','Saudi Arabia', 'SN','Senegal', 'RS','Serbia', 'SC','Seychelles', 'SL','Sierra Leone', 'SG','Singapore', 'SK','Slovakia (Slovak Republic)', 'SI','Slovenia', 'SB','Solomon Islands', 'SO','Somalia, Somali Republic', 'ZA','South Africa', 'GS','South Georgia and the South Sandwich Islands', 'ES','Spain', 'LK','Sri Lanka', 'SD','Sudan', 'SR','Suriname', 'SJ','Svalbard & Jan Mayen Islands', 'SZ','Swaziland', 'SE','Sweden', 'CH','Switzerland, Swiss Confederation', 'SY','Syrian Arab Republic', 'TW','Taiwan', 'TJ','Tajikistan', 'TZ','Tanzania', 'TH','Thailand', 'TL','Timor-Leste', 'TG','Togo', 'TK','Tokelau', 'TO','Tonga', 'TT','Trinidad and Tobago', 'TN','Tunisia', 'TR','Turkey', 'TM','Turkmenistan', 'TC','Turks and Caicos Islands', 'TV','Tuvalu', 'UG','Uganda', 'UA','Ukraine', 'AE','United Arab Emirates', 'GB','United Kingdom', 'US','United States of America', 'UM','United States Minor Outlying Islands', 'VI','United States Virgin Islands', 'UY','Uruguay, Eastern Republic of', 'UZ','Uzbekistan', 'VU','Vanuatu', 'VE','Venezuela', 'VN','Vietnam', 'WF','Wallis and Futuna', 'EH','Western Sahara', 'YE','Yemen', 'ZM','Zambia', 'ZW','Zimbabwe']; $sellong=' ...
or, 2 letter ISO Country Code
'; function country_code_to_country( $code ){ $code = strtoupper($code); $country = ''; if( $code == 'AF' ) $country = 'Afghanistan'; if( $code == 'AX' ) $country = 'Aland Islands'; if( $code == 'AL' ) $country = 'Albania'; if( $code == 'DZ' ) $country = 'Algeria'; if( $code == 'AS' ) $country = 'American Samoa'; if( $code == 'AD' ) $country = 'Andorra'; if( $code == 'AO' ) $country = 'Angola'; if( $code == 'AI' ) $country = 'Anguilla'; if( $code == 'AQ' ) $country = 'Antarctica'; if( $code == 'AG' ) $country = 'Antigua and Barbuda'; if( $code == 'AR' ) $country = 'Argentina'; if( $code == 'AM' ) $country = 'Armenia'; if( $code == 'AW' ) $country = 'Aruba'; if( $code == 'AU' ) $country = 'Australia'; if( $code == 'AT' ) $country = 'Austria'; if( $code == 'AZ' ) $country = 'Azerbaijan'; if( $code == 'BS' ) $country = 'Bahamas the'; if( $code == 'BH' ) $country = 'Bahrain'; if( $code == 'BD' ) $country = 'Bangladesh'; if( $code == 'BB' ) $country = 'Barbados'; if( $code == 'BY' ) $country = 'Belarus'; if( $code == 'BE' ) $country = 'Belgium'; if( $code == 'BZ' ) $country = 'Belize'; if( $code == 'BJ' ) $country = 'Benin'; if( $code == 'BM' ) $country = 'Bermuda'; if( $code == 'BT' ) $country = 'Bhutan'; if( $code == 'BO' ) $country = 'Bolivia'; if( $code == 'BA' ) $country = 'Bosnia and Herzegovina'; if( $code == 'BW' ) $country = 'Botswana'; if( $code == 'BV' ) $country = 'Bouvet Island (Bouvetoya)'; if( $code == 'BR' ) $country = 'Brazil'; if( $code == 'IO' ) $country = 'British Indian Ocean Territory (Chagos Archipelago)'; if( $code == 'VG' ) $country = 'British Virgin Islands'; if( $code == 'BN' ) $country = 'Brunei Darussalam'; if( $code == 'BG' ) $country = 'Bulgaria'; if( $code == 'BF' ) $country = 'Burkina Faso'; if( $code == 'BI' ) $country = 'Burundi'; if( $code == 'KH' ) $country = 'Cambodia'; if( $code == 'CM' ) $country = 'Cameroon'; if( $code == 'CA' ) $country = 'Canada'; if( $code == 'CV' ) $country = 'Cape Verde'; if( $code == 'KY' ) $country = 'Cayman Islands'; if( $code == 'CF' ) $country = 'Central African Republic'; if( $code == 'TD' ) $country = 'Chad'; if( $code == 'CL' ) $country = 'Chile'; if( $code == 'CN' ) $country = 'China'; if( $code == 'CX' ) $country = 'Christmas Island'; if( $code == 'CC' ) $country = 'Cocos (Keeling) Islands'; if( $code == 'CO' ) $country = 'Colombia'; if( $code == 'KM' ) $country = 'Comoros the'; if( $code == 'CD' ) $country = 'Congo'; if( $code == 'CG' ) $country = 'Congo the'; if( $code == 'CK' ) $country = 'Cook Islands'; if( $code == 'CR' ) $country = 'Costa Rica'; if( $code == 'CI' ) $country = 'Cote d\'Ivoire'; if( $code == 'HR' ) $country = 'Croatia'; if( $code == 'CU' ) $country = 'Cuba'; if( $code == 'CY' ) $country = 'Cyprus'; if( $code == 'CZ' ) $country = 'Czech Republic'; if( $code == 'DK' ) $country = 'Denmark'; if( $code == 'DJ' ) $country = 'Djibouti'; if( $code == 'DM' ) $country = 'Dominica'; if( $code == 'DO' ) $country = 'Dominican Republic'; if( $code == 'EC' ) $country = 'Ecuador'; if( $code == 'EG' ) $country = 'Egypt'; if( $code == 'SV' ) $country = 'El Salvador'; if( $code == 'GQ' ) $country = 'Equatorial Guinea'; if( $code == 'ER' ) $country = 'Eritrea'; if( $code == 'EE' ) $country = 'Estonia'; if( $code == 'ET' ) $country = 'Ethiopia'; if( $code == 'FO' ) $country = 'Faroe Islands'; if( $code == 'FK' ) $country = 'Falkland Islands (Malvinas)'; if( $code == 'FJ' ) $country = 'Fiji the Fiji Islands'; if( $code == 'FI' ) $country = 'Finland'; if( $code == 'FR' ) $country = 'France, French Republic'; if( $code == 'GF' ) $country = 'French Guiana'; if( $code == 'PF' ) $country = 'French Polynesia'; if( $code == 'TF' ) $country = 'French Southern Territories'; if( $code == 'GA' ) $country = 'Gabon'; if( $code == 'GM' ) $country = 'Gambia the'; if( $code == 'GE' ) $country = 'Georgia'; if( $code == 'DE' ) $country = 'Germany'; if( $code == 'GH' ) $country = 'Ghana'; if( $code == 'GI' ) $country = 'Gibraltar'; if( $code == 'GR' ) $country = 'Greece'; if( $code == 'GL' ) $country = 'Greenland'; if( $code == 'GD' ) $country = 'Grenada'; if( $code == 'GP' ) $country = 'Guadeloupe'; if( $code == 'GU' ) $country = 'Guam'; if( $code == 'GT' ) $country = 'Guatemala'; if( $code == 'GG' ) $country = 'Guernsey'; if( $code == 'GN' ) $country = 'Guinea'; if( $code == 'GW' ) $country = 'Guinea-Bissau'; if( $code == 'GY' ) $country = 'Guyana'; if( $code == 'HT' ) $country = 'Haiti'; if( $code == 'HM' ) $country = 'Heard Island and McDonald Islands'; if( $code == 'VA' ) $country = 'Holy See (Vatican City State)'; if( $code == 'HN' ) $country = 'Honduras'; if( $code == 'HK' ) $country = 'Hong Kong'; if( $code == 'HU' ) $country = 'Hungary'; if( $code == 'IS' ) $country = 'Iceland'; if( $code == 'IN' ) $country = 'India'; if( $code == 'ID' ) $country = 'Indonesia'; if( $code == 'IR' ) $country = 'Iran'; if( $code == 'IQ' ) $country = 'Iraq'; if( $code == 'IE' ) $country = 'Ireland'; if( $code == 'IM' ) $country = 'Isle of Man'; if( $code == 'IL' ) $country = 'Israel'; if( $code == 'IT' ) $country = 'Italy'; if( $code == 'JM' ) $country = 'Jamaica'; if( $code == 'JP' ) $country = 'Japan'; if( $code == 'JE' ) $country = 'Jersey'; if( $code == 'JO' ) $country = 'Jordan'; if( $code == 'KZ' ) $country = 'Kazakhstan'; if( $code == 'KE' ) $country = 'Kenya'; if( $code == 'KI' ) $country = 'Kiribati'; if( $code == 'KP' ) $country = 'Korea'; if( $code == 'KR' ) $country = 'Korea'; if( $code == 'KW' ) $country = 'Kuwait'; if( $code == 'KG' ) $country = 'Kyrgyz Republic'; if( $code == 'LA' ) $country = 'Lao'; if( $code == 'LV' ) $country = 'Latvia'; if( $code == 'LB' ) $country = 'Lebanon'; if( $code == 'LS' ) $country = 'Lesotho'; if( $code == 'LR' ) $country = 'Liberia'; if( $code == 'LY' ) $country = 'Libyan Arab Jamahiriya'; if( $code == 'LI' ) $country = 'Liechtenstein'; if( $code == 'LT' ) $country = 'Lithuania'; if( $code == 'LU' ) $country = 'Luxembourg'; if( $code == 'MO' ) $country = 'Macao'; if( $code == 'MK' ) $country = 'Macedonia'; if( $code == 'MG' ) $country = 'Madagascar'; if( $code == 'MW' ) $country = 'Malawi'; if( $code == 'MY' ) $country = 'Malaysia'; if( $code == 'MV' ) $country = 'Maldives'; if( $code == 'ML' ) $country = 'Mali'; if( $code == 'MT' ) $country = 'Malta'; if( $code == 'MH' ) $country = 'Marshall Islands'; if( $code == 'MQ' ) $country = 'Martinique'; if( $code == 'MR' ) $country = 'Mauritania'; if( $code == 'MU' ) $country = 'Mauritius'; if( $code == 'YT' ) $country = 'Mayotte'; if( $code == 'MX' ) $country = 'Mexico'; if( $code == 'FM' ) $country = 'Micronesia'; if( $code == 'MD' ) $country = 'Moldova'; if( $code == 'MC' ) $country = 'Monaco'; if( $code == 'MN' ) $country = 'Mongolia'; if( $code == 'ME' ) $country = 'Montenegro'; if( $code == 'MS' ) $country = 'Montserrat'; if( $code == 'MA' ) $country = 'Morocco'; if( $code == 'MZ' ) $country = 'Mozambique'; if( $code == 'MM' ) $country = 'Myanmar'; if( $code == 'NA' ) $country = 'Namibia'; if( $code == 'NR' ) $country = 'Nauru'; if( $code == 'NP' ) $country = 'Nepal'; if( $code == 'AN' ) $country = 'Netherlands Antilles'; if( $code == 'NL' ) $country = 'Netherlands the'; if( $code == 'NC' ) $country = 'New Caledonia'; if( $code == 'NZ' ) $country = 'New Zealand'; if( $code == 'NI' ) $country = 'Nicaragua'; if( $code == 'NE' ) $country = 'Niger'; if( $code == 'NG' ) $country = 'Nigeria'; if( $code == 'NU' ) $country = 'Niue'; if( $code == 'NF' ) $country = 'Norfolk Island'; if( $code == 'MP' ) $country = 'Northern Mariana Islands'; if( $code == 'NO' ) $country = 'Norway'; if( $code == 'OM' ) $country = 'Oman'; if( $code == 'PK' ) $country = 'Pakistan'; if( $code == 'PW' ) $country = 'Palau'; if( $code == 'PS' ) $country = 'Palestinian Territory'; if( $code == 'PA' ) $country = 'Panama'; if( $code == 'PG' ) $country = 'Papua New Guinea'; if( $code == 'PY' ) $country = 'Paraguay'; if( $code == 'PE' ) $country = 'Peru'; if( $code == 'PH' ) $country = 'Philippines'; if( $code == 'PN' ) $country = 'Pitcairn Islands'; if( $code == 'PL' ) $country = 'Poland'; if( $code == 'PT' ) $country = 'Portugal, Portuguese Republic'; if( $code == 'PR' ) $country = 'Puerto Rico'; if( $code == 'QA' ) $country = 'Qatar'; if( $code == 'RE' ) $country = 'Reunion'; if( $code == 'RO' ) $country = 'Romania'; if( $code == 'RU' ) $country = 'Russian Federation'; if( $code == 'RW' ) $country = 'Rwanda'; if( $code == 'BL' ) $country = 'Saint Barthelemy'; if( $code == 'SH' ) $country = 'Saint Helena'; if( $code == 'KN' ) $country = 'Saint Kitts and Nevis'; if( $code == 'LC' ) $country = 'Saint Lucia'; if( $code == 'MF' ) $country = 'Saint Martin'; if( $code == 'PM' ) $country = 'Saint Pierre and Miquelon'; if( $code == 'VC' ) $country = 'Saint Vincent and the Grenadines'; if( $code == 'WS' ) $country = 'Samoa'; if( $code == 'SM' ) $country = 'San Marino'; if( $code == 'ST' ) $country = 'Sao Tome and Principe'; if( $code == 'SA' ) $country = 'Saudi Arabia'; if( $code == 'SN' ) $country = 'Senegal'; if( $code == 'RS' ) $country = 'Serbia'; if( $code == 'SC' ) $country = 'Seychelles'; if( $code == 'SL' ) $country = 'Sierra Leone'; if( $code == 'SG' ) $country = 'Singapore'; if( $code == 'SK' ) $country = 'Slovakia (Slovak Republic)'; if( $code == 'SI' ) $country = 'Slovenia'; if( $code == 'SB' ) $country = 'Solomon Islands'; if( $code == 'SO' ) $country = 'Somalia, Somali Republic'; if( $code == 'ZA' ) $country = 'South Africa'; if( $code == 'GS' ) $country = 'South Georgia and the South Sandwich Islands'; if( $code == 'ES' ) $country = 'Spain'; if( $code == 'LK' ) $country = 'Sri Lanka'; if( $code == 'SD' ) $country = 'Sudan'; if( $code == 'SR' ) $country = 'Suriname'; if( $code == 'SJ' ) $country = 'Svalbard & Jan Mayen Islands'; if( $code == 'SZ' ) $country = 'Swaziland'; if( $code == 'SE' ) $country = 'Sweden'; if( $code == 'CH' ) $country = 'Switzerland, Swiss Confederation'; if( $code == 'SY' ) $country = 'Syrian Arab Republic'; if( $code == 'TW' ) $country = 'Taiwan'; if( $code == 'TJ' ) $country = 'Tajikistan'; if( $code == 'TZ' ) $country = 'Tanzania'; if( $code == 'TH' ) $country = 'Thailand'; if( $code == 'TL' ) $country = 'Timor-Leste'; if( $code == 'TG' ) $country = 'Togo'; if( $code == 'TK' ) $country = 'Tokelau'; if( $code == 'TO' ) $country = 'Tonga'; if( $code == 'TT' ) $country = 'Trinidad and Tobago'; if( $code == 'TN' ) $country = 'Tunisia'; if( $code == 'TR' ) $country = 'Turkey'; if( $code == 'TM' ) $country = 'Turkmenistan'; if( $code == 'TC' ) $country = 'Turks and Caicos Islands'; if( $code == 'TV' ) $country = 'Tuvalu'; if( $code == 'UG' ) $country = 'Uganda'; if( $code == 'UA' ) $country = 'Ukraine'; if( $code == 'AE' ) $country = 'United Arab Emirates'; if( $code == 'GB' ) $country = 'United Kingdom'; if( $code == 'US' ) $country = 'United States of America'; if( $code == 'UM' ) $country = 'United States Minor Outlying Islands'; if( $code == 'VI' ) $country = 'United States Virgin Islands'; if( $code == 'UY' ) $country = 'Uruguay, Eastern Republic of'; if( $code == 'UZ' ) $country = 'Uzbekistan'; if( $code == 'VU' ) $country = 'Vanuatu'; if( $code == 'VE' ) $country = 'Venezuela'; if( $code == 'VN' ) $country = 'Vietnam'; if( $code == 'WF' ) $country = 'Wallis and Futuna'; if( $code == 'EH' ) $country = 'Western Sahara'; if( $code == 'YE' ) $country = 'Yemen'; if( $code == 'ZM' ) $country = 'Zambia'; if( $code == 'ZW' ) $country = 'Zimbabwe'; if( $country == '') $country = $code; return $country; } function ourtimezonelist($ididea) { // thanks to http://php.net/manual/en/function.timezone-identifiers-list.php global $kcnt, $formstuff, $hprefix, $hsuffix, $sellong; $tzn=""; $selstuff=""; if (isset($_GET['tzname'])) { $tzn=urldecode($_GET['tzname']); if (strpos($tzn,"/") === false && strpos($tzn,"-") === false && strpos($tzn,"+") === false && $tzn != "") $tzn="+" . trim($tzn); //echo $tzn; //exit; } if ($ididea == "szt" && $tzn != "") { $places="Places"; if (strpos($hprefix, ""; //$prefix="') != -1) { tds[itds].style.display='none'; } } } " . $hprefix; //

TimeZone Places

RJM Programming - December, 2016

Thanks to http://php.net/manual/en/datetimezone.getlocation.php and
http://stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name and
http://php.net/manual/en/function.timezone-identifiers-list.php and
http://www.timezoneconverter.com/

" . $hprefix; $formstuff=""; if (isset($_GET['iso'])) { $places="Places"; for ($ic=0; $ic', 'value="' . $_GET['iso'] . '">',str_replace('"' . $_GET['iso'] . '"', '"' . $_GET['iso'] . '" selected',$sellong)); $timeZones = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, $_GET['iso']); $prefix="
"; } else { $prefix="" . $yourmapstuff . "
"; } $hprefix=""; $suffix=""; $ourmapstuff=""; $yourmapstuff=""; $formstuff=""; $timezone_abbreviations = DateTimeZone::listAbbreviations(); foreach ($timezone_abbreviations["est"] as $tzo) { $okay=false; //echo $tzn . ' ' . $tzo['timezone_id']; //exit; //echo (str_replace("%2B","+",$_GET['tzname'])); //exit; //echo (3600 * str_replace("+","",$_GET['tzname'])) . " " . $tzo['offset']; //exit; if (strpos($tzo['timezone_id'], $tzn) !== false) { $tz = new DateTimeZone($tzo['timezone_id']); $okay=true; } else if ((3600 * str_replace("+","",$_GET['tzname'])) == $tzo['offset']) { $tz = new DateTimeZone($tzo['timezone_id']); $okay=true; } if ($okay) { $zoneName = $tzo['timezone_id']; $loc = $tz->getLocation(); if ($loc[latitude] != 0 || $loc[longitude] != 0) { if ($tzo['offset'] < 0) { $coffset=($tzo['offset'] / 3600); } else { $coffset="+" . ($tzo['offset'] / 3600); } $zbits=explode("/",$zoneName); if ($ourmapstuff == "") { $ourmapstuff="       
document.getElementById('smapif').click(); "; $yourmapstuff="
       "; //$formstuff="
function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); "; $formstuff="
function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); "; $formstuff=str_replace('" name="data"', ',[' . $loc[latitude] . ',' . $loc[longitude] . ',~' . str_replace("_"," ",explode(",",$zbits[-1 + sizeof($zbits)])[0]) . '~]" name="data"', $formstuff); } else { $ourmapstuff=str_replace(">', $sellong)[1]; $titlebit=explode("<", $pretitlebit)[0] . "/" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . ',' . $loc[latitude] . ',' . $loc[longitude] . ',' . ($tzo['offset'] / 3600); if (strpos($titlebit,"Optionally Select Country of Interest below ...") !== false) { $selstuff.=$prefix . " " . $zoneName . " = " . $loc['comments'] . " ... " . $coffset . $suffix . "
"; } else { $selstuff.=$prefix . " " . $zoneName . " = " . $loc['comments'] . " ... " . $coffset . $suffix . "
"; } $prefix=""; $suffix=""; } } } $selstuff.="

"; $ididea="tzs"; //if (strpos($hprefix, "'; for ($xoff=-24.0; $xoff<=24.0; $xoff+=0.5) { $selstuff=str_replace("", "", $selstuff); } $zones = timezone_identifiers_list(); foreach ($zones as $zone) { $origzone=$zone; //$ourtz=new DateTimeZone($zone); $zzbit=$zone; $zone = explode('/', $zone); // 0 => Continent, 1 => City // Only use "friendly" continent names if ($zone[0] == 'Africa' || $zone[0] == 'America' || $zone[0] == 'Antarctica' || $zone[0] == 'Arctic' || $zone[0] == 'Asia' || $zone[0] == 'Atlantic' || $zone[0] == 'Australia' || $zone[0] == 'Europe' || $zone[0] == 'Indian' || $zone[0] == 'Pacific') { if (isset($zone[1]) != '') { //$locations[$zone[0]][$zone[0]. '/' . $zone[1]] = str_replace('_', ' ', $zone[1]); // Creates array(DateTimeZone => 'Friendly name') //$ourtz=new DateTimeZone(str_replace('_', ' ', $zone[0]. '/' . $zone[1])); //$selstuff=str_replace("", "", $selstuff); //$selstuff=str_replace("", "", $selstuff); $selstuff=str_replace("", "", $selstuff); //$selstuff=str_replace("", "", $selstuff); } } } if (isset($_GET['tzname'])) { if (strpos($selstuff, ("'" . urldecode($_GET['tzname']) . "'>")) !== false) { $selstuff=str_replace(("'" . urldecode($_GET['tzname']) . "'>"),("'" . urldecode($_GET['tzname']) . "' selected>"),$selstuff); } } return $selstuff; } echo " TimeZone Places - RJM Programming - December, 2016 ... Thanks to http://php.net/manual/en/datetimezone.getlocation.php and http://stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name var iam=" . $iam . "; var iamleft=" . ((600 * ($iam - 1)) + 100) . "; var arrmaplist=[], maplist='', lastmaplist='', mapdelim=';'; function great_circle_distance(talis, gnolis, latis, longis) { var ourdist=0.0; var rgnol=eval((gnolis) * Math.PI / 180.0); var rtal=eval((talis) * Math.PI / 180.0); var rlong=eval((longis) * Math.PI / 180.0); var rlat=eval((latis) * Math.PI / 180.0); var deltalong = Math.abs(eval(((gnolis)-(longis)) * Math.PI / 180.0)); var acof = eval(Math.sin(rtal) * Math.sin(rlat)) + (Math.cos(rtal) * Math.cos(rlat) * Math.cos(deltalong)); // via http://en.wikipedia.org/wiki/Great-circle_distance ... thanks ourdist = eval(Math.round((Math.acos(acof) * 6371000.0) + 0.00001) * 100) / 100; return ourdist; } function checkmailbox() { var urlis='', ih='', jiarr=[], ijarr=[], ijcont='', ijplace='', jicont='', jiplace=''; //alert(99 + ' ' + maplist); if (top.document.getElementById('mapphpmailbox').value != maplist) { if (maplist.length > top.document.getElementById('mapphpmailbox').value.length) { top.document.getElementById('mapphpmailbox').value=maplist; } else { maplist=top.document.getElementById('mapphpmailbox').value; } arrmaplist=maplist.split(mapdelim); } if (arrmaplist.length > 1) { //alert(98); if (document.getElementById('fromto') && lastmaplist != maplist) { //alert(97); lastmaplist=maplist; ih=\"\"; //alert(ih); for (var ij=0; ij' + ijplace.replace(/%20/g,' ') + ' to ' + jiplace.replace(/%20/g,' ') + ' ... ' + eval(great_circle_distance(ijarr[1], ijarr[2], jiarr[1], jiarr[2]) / 1000.0) + 'km ... ' + eval(eval(jiarr[3]) - eval(ijarr[3])) + ' hours difference'; } } } document.getElementById('fromto').innerHTML=ih; document.getElementById('fromto').style.display='inline'; } } setTimeout(checkmailbox, 3000); } function addtolist(nextarrmember) { // alert(198); if (top.document.getElementById('mapphpmailbox').value.indexOf(nextarrmember) == -1) { // alert(197); if (top.document.getElementById('mapphpmailbox').value != '') { top.document.getElementById('mapphpmailbox').value+=mapdelim + nextarrmember; } else { top.document.getElementById('mapphpmailbox').value=nextarrmember; } maplist=top.document.getElementById('mapphpmailbox').value; arrmaplist=maplist.split(mapdelim); // alert(maplist); } } function mapselchange(othis) { if (othis.value.length > 0) { window.open(othis.value,'_blank','top=10,left=10,width=1200,height=800'); } } function changetz(intz) { } function changeiso(intz) { } function newiframe(wht) { document.getElementById('td' + wht).innerHTML=''; } function fixforlocal() { var dd=new Date(); var qw1=eval(eval((eval(dd.toTimeString().replace('-',' ').replace('+',' ').split(' ')[2]) - eval(dd.toTimeString().replace('-',' ').replace('+',' ').split(' ')[2] % 100)) / 100) + eval((0.0 + eval(dd.toTimeString().replace('-',' ').replace('+',' ').split(' ')[2] % 100)) / 60.0)); if (dd.toTimeString().indexOf('+') != -1) qw1=-qw1; if (document.getElementById('stzs').innerHTML.indexOf(' value=\"\">') != -1) { if (eval(0 - eval(qw1)) >= 0) { document.getElementById('stzs').innerHTML=document.getElementById('stzs').innerHTML.replace(' value=\"\">Local', ' value=\"+' + eval(0 - eval(qw1)) + '\">Local'); document.getElementById('stzs').value='+' + eval(0 - eval(qw1)); } else { document.getElementById('stzs').innerHTML=document.getElementById('stzs').innerHTML.replace(' value=\"\">Local', ' value=\"' + eval(0 - eval(qw1)) + '\">Local'); document.getElementById('stzs').value=eval(0 - eval(qw1)); } } var tds=document.getElementsByTagName('table'); for (var itds=0; itds
" . $yourmapstuff . "
"; $suffix=""; $ourmapstuff=""; $yourmapstuff=""; $formstuff=""; $ideais="tzs"; if ($_GET['iso'] == '' && isset($_GET['tzname'])) { $ideais="szt"; } else { foreach ( $timeZones as $key => $zoneName ) { $otz = new DateTimeZone("Europe/London"); $tz = new DateTimeZone($zoneName); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } // $zbits=explode("/",explode(",",$zoneName)[0]); $loc = $tz->getLocation(); if ($ourmapstuff == "") { $ourmapstuff="       
document.getElementById('smapif').click(); "; $yourmapstuff="
       "; //$formstuff="
function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); "; $formstuff="
function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); "; $formstuff=str_replace('" name="data"', ',[' . $loc[latitude] . ',' . $loc[longitude] . ',~' . str_replace("_"," ",explode(",",$zbits[-1 + sizeof($zbits)])[0]) . '~]" name="data"', $formstuff); } else { $ourmapstuff=str_replace(">', $sellong)[1]; $titlebit=explode("<", $pretitlebit)[0] . "/" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . ',' . $loc[latitude] . ',' . $loc[longitude] . ',' . $offset; if (strpos($titlebit,"Optionally Select Country of Interest below ...") !== false) { print($prefix . " " . $zoneName . " = " . $loc['comments'] . " ... " . $coffset . $suffix . "
"); } else { print($prefix . " " . $zoneName . " = " . $loc['comments'] . " ... " . $coffset . $suffix . "
"); } $prefix=""; $suffix=""; } } //$yourmapstuff=""; print("
"); //print("" . ""); } if ($iam == "1") { echo ""; } echo "
" . $fromto . "

" . $sellong . ourtimezonelist($ideais) . "
" . $formstuff . $hsuffix . " "; ?>