"; $gmtdatetimeis=""; $onloadbits=""; $fromto=""; $kcnt=""; $bcol=["gray", "yellow", "pink", "lightblue", "lightgreen", "silver", "lightgray", "orange", "olive", "white"]; $mapurl="//www.rjmprogramming.com.au/PHP/Map/map.php?title=Places&onclick=y&label=['Lat',&value='Lon','Name']&data=,[0.0000,0.0000,~Timbuktu~]"; $iam='1'; if (isset($_GET['x'])) { $finalmapform="
function topdoc() { document.getElementById('topsmapif').click(); } "; } if (isset($_POST['iam'])) { $iam=$_POST['iam']; } else if (isset($_GET['iam'])) { $iam=$_GET['iam']; } else { $finalmapform="
function topdoc() { document.getElementById('topsmapif').click(); } "; } if ($iam == "1") { //$prefinalmapform="
function topdoc() { document.getElementById('topsmapif').click(); } "; //$finalmapform=" parent.document.body.innerHTML+=\"" . $finalmapiframe . $prefinalmapform . "\"; "; $finalmapform="
function topdoc() { document.getElementById('topsmapif').click(); } "; } $nextis=1 + $iam; $hprefix=""; $hsuffix=""; $otherform=""; $indt="now"; $udateis = localtimefromtogmt($indt, "Australi" . "a/Perth", "UTC"); $times="Time"; if (isset($_GET['bigtz'])) { $aqagain="\n setInterval(afteraqlast, 1000); \n"; $times="
Time"; } if ($iam == "1" && !isset($_POST['iam']) && !isset($_GET['iam'])) { $otherform="

Place: 0) { document.getElementById('nearestif').src='./tz_places.php?latitude=&longitude=&place=' + encodeURIComponent(this.value); } \" type=text id=nplace name=place value=> Latitude: Longitude:
"; $hprefix="

" . $times . "
&#" . $bestemojicodepoint . ";
Zone Places

RJM Programming - December, 2016

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

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

Place: 0) { document.getElementById('nearestif').src='./tz_places.php?latitude=&longitude=&place=' + encodeURIComponent(this.value); } \" type=text id=nplace name=place name=place value=> Latitude: Longitude:
"; $hprefix="

" . $times . "
&#" . $bestemojicodepoint . ";
Zone Places

RJM Programming - December, 2016

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

" . "
" . $finalmapiframe; for ($ii=2; $ii<10; $ii++) { $hsuffix.="+" . $ii . ""; } $hsuffix.="
"; $fromto="  "; $onloadbits=" setTimeout(checkmailbox,3000); "; } else { $hprefix="" . $finalmapiframe; //"
"; $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', 'CW','Curaçao', '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', 'XK','Kosovo', 'KW','Kuwait', 'KG','Kyrgyz Republic', 'LA','Laos', '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', 'OS','South Ossetia', 'SS','South Sudan', '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
📹

'; if (isset($_POST['infillflag'])) { $scriss=""; $scrisslater=""; $clist=str_replace('+',' ',urldecode($_POST['infillflag'])); $sls=explode("", $sellong); $clists=explode("(", $clist); for ($iv=1; $iv' . $inctyis . '<') !== false) { $thistcc=strtoupper(substr(explode('">' . $inctyis . '<', $sellong)[0],-2,2)); } else { $ws=explode(' ', $inctyis); $fndis=false; $fsofar='">' . $ws[0]; for ($ij=1; $ij' . $fsofar, $sellong)[0],-2,2)); } $fsofar.=' ' . $ws[$ij]; } } if (trim($thistcc) != "") { if (strpos($inctyis, ",") === false) { $preinctyis="("; if (strpos($inctyis, "Saint Barth") !== false) { $inctyis="lemy"; $preinctyis=""; } $scriss.="\n parent.document.getElementById('txtHint').innerHTML=parent.document.getElementById('txtHint').innerHTML.replace('" . $preinctyis . $inctyis . ")', '" .$preinctyis . $inctyis . " ' + orflag('" . $thistcc . "') + ')'); \n"; $scrisslater.="\n parent.document.getElementById('ssug').innerHTML=parent.document.getElementById('ssug').innerHTML.replace('" . $preinctyis . $inctyis . ")<', '" . $preinctyis . $inctyis . " ' + orflag('" . $thistcc . "') + ')<'); \n"; } } } echo " var dri=['127462','127463','127464','127465','127466','127467','127468','127469','127470','127471','127472','127473','127474','127475','127476','127477','127478','127479','127480','127481','127482','127483','127484','127485','127486','127487']; var lri='ABCDEFGHIJKLMNOPQRSTUVWXYZ'; if (!String.fromCodePoint) { // thanks to http://xahlee.info/js/js_unicode_code_point.html // ES6 Unicode Shims 0.1 , © 2012 Steven Levithan , MIT License String.fromCodePoint = function fromCodePoint () { var chars = [], point, offset, units, i; for (i = 0; i < arguments.length; ++i) { point = arguments[i]; offset = point - 0x10000; units = point > 0xFFFF ? [0xD800 + (offset >> 10), 0xDC00 + (offset & 0x3FF)] : [point]; chars.push(String.fromCharCode.apply(null, units)); } return chars.join(''); } } function orflag(thiscc) { var ccsuff='', ccchar=' ', cde=''; for (var iccsuff=0; iccsuff"; exit; } if (isset($_GET['quicktzcountryclarification'])) { try { $contis=""; $ooctycode=""; $codeis=""; $wlook=""; if (strpos($_GET['quicktzcountryclarification'], "/") !== false) { $tzis=str_replace("+","_",$_GET['quicktzcountryclarification']); //$ootz = new DateTimeZone($tzis); if (!isset($_GET['continent'])) { $contis=explode("/", $tzis)[0]; } else { $contis=$_GET['continent']; } } else { $tzis=str_replace("+","_",urldecode($_GET['quicktzcountryclarification'])); //$ootz = new DateTimeZone($tzis); if (!isset($_GET['continent'])) { $contis=explode("/", $tzis)[0]; } else { $contis=str_replace("+","_",urldecode($_GET['continent'])); } } $timezones = array(str_replace(" ","_",$tzis)); //array($tzis); foreach ($timezones as $otz) { $ootz = new DateTimeZone($otz); //echo "prehere"; $oocloc=$ootz->getLocation(); //$ooctrycode=print_r($oocloc,true); //echo "here"; $ooctrycode=$oocloc['country_code']; //echo "ooctrycode=" . $ooctrycode; $codeis=$ooctrycode; } if ($ooctrycode != "") { $codeis=$ooctrycode; if (strpos($sellong, '"' . $ooctrycode . '">') !== false) { $ooz=explode('"' . $ooctrycode . '">', $sellong); $wlook=str_replace("_"," ",explode("/",$tzis)[-1 + sizeof(explode("/",$tzis))]); for ($ipo=(-2 + sizeof(explode("/",$tzis))); $ipo>=1; $ipo--) { $wlook.="," . str_replace("_"," ",explode("/",$tzis)[$ipo]); } $ooctrycode=str_replace("/"," ",str_replace(","," ",explode("<",$ooz[1])[0])); if (strpos($wlook,("," . str_replace("_"," ",$ooctrycode))) === false) $wlook.="," . str_replace("_"," ",$ooctrycode); } $dok=true; if (isset($_GET['vscode'])) { if ($codeis != $_GET['vscode']) { $dok=false; echo ""; } } if (isset($_GET['vscountry'])) { if (strpos(("~" . $ooctrycode), ("~" . str_replace("+"," ",urldecode($_GET['vscountry'])))) === false) { $dok=false; echo ""; } } if ($dok) echo ""; } else if (isset($_GET['vscode']) || isset($_GET['vscountry'])) { echo ""; } exit; } catch (Exception $e) { exit; } } 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 == 'CW' ) $country = 'Curaçao'; 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 == 'XK' ) $country = 'Kosovo'; 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 == 'OS' ) $country = 'South Ossetia'; if( $code == 'SS' ) $country = 'South Sudan'; 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 find_nearest() { global $nearname, $nearlatitude, $nearlongitude, $pd; $best1=-1; $best2=-1; $best3=-1; $latlongdistsquared=-1.0; $latlongdistsquaredtwo=-1.0; $latlongdistsquaredthree=-1.0; $gcddistsquared=-1.0; $gcddistsquaredtwo=-1.0; $gcddistsquaredthree=-1.0; $gcddistsquaredll=""; $gcddistsquaredtwoll=""; $gcddistsquaredthreell=""; if (isset($_GET['latitude']) && isset($_GET['place']) && isset($_GET['longitude'])) { if ($_GET['latitude'] == '' && $_GET['longitude'] == '') { if (urldecode($_GET['place']) != '') { $huh=file_get_contents("https://www.google.com.au/search?q=" . urlencode(urldecode($_GET['place'])) . "+latitude"); // IigAMAI">
33.8688° S, 151.2093° E
// /www.distancesto.com/coordinates/au/sydney-nsw-latitude-longitude/history/3571.html&sa=U&ved=0ahUKEwjkx_er1P_QAhXJnZQKHRZrD84QFggtMAQ&usg=AFQjCNEcVCnwSmFGVx0FkHV9rFtk1p99Ug">Sydney NSW Latitude and Longitude - Distance Calculator
https://www.distancesto.com/.../au/sydney-nsw-latitude.../3571.html
Sydney NSW Latitude and Longitude. The latitude for Sydney NSW, Australia is: -
33.8674869 and the longitude is: 151.20699020000006.
$hbits=explode(" S, ", $huh); if (sizeof($hbits) >= 2) { $latsofar=substr(trim(explode(">", $hbits[0])[-1 + sizeof(explode(">", $hbits[0]))]),0,(strlen(trim(explode(">", $hbits[0])[-1 + sizeof(explode(">", $hbits[0]))])) - 1)); $latsofar=-$latsofar; $longsofar=substr(trim(explode(" ", $hbits[1])[0]),0,(strlen(trim(explode(" ", $hbits[1])[0])) - 1)); if (substr(explode(" ", $hbits[1])[1], 0, 1) == "W") $longsofar=-$longsofar; echo " function lookoutfortop() { if (top.document.getElementById('nearest')) { top.document.getElementById('latitude').value=\"" . $latsofar . "\"; top.document.getElementById('longitude').value=\"" . $longsofar . "\"; } else { document.body.innerHTML=\"" . $latsofar . "," . $longsofar . "\"; } } " . $pd . ""; exit; } else { $hbits=explode(" N, ", $huh); if (sizeof($hbits) >= 2) { $latsofar=substr(trim(explode(">", $hbits[0])[-1 + sizeof(explode(">", $hbits[0]))]),0,(strlen(trim(explode(">", $hbits[0])[-1 + sizeof(explode(">", $hbits[0]))])) - 1)); $longsofar=substr(trim(explode(" ", $hbits[1])[0]),0,(strlen(trim(explode(" ", $hbits[1])[0])) - 1)); if (substr(explode(" ", $hbits[1])[1], 0, 1) == "W") $longsofar=-$longsofar; echo " function lookoutfortop() { if (top.document.getElementById('nearest')) { top.document.getElementById('latitude').value=\"" . $latsofar . "\"; top.document.getElementById('longitude').value=\"" . $longsofar . "\"; } else { document.body.innerHTML=\"" . $latsofar . "," . $longsofar . "\"; } } " . $pd . ""; exit; } } } } else { if (sizeof($nearname) > 1) { for ($ij=0; $ij<(-1 + sizeof($nearname)); $ij++) { if ($latlongdistsquared < 0.0) { $latlongdistsquared=($nearlatitude[$ij] - floatval(urldecode($_GET['latitude']))) * ($nearlatitude[$ij] - floatval(urldecode($_GET['latitude']))) + ($nearlongitude[$ij] - floatval(urldecode($_GET['longitude']))) * ($nearlongitude[$ij] - floatval(urldecode($_GET['longitude']))); $best1=$ij; } else { $thisll=($nearlatitude[$ij] - floatval(urldecode($_GET['latitude']))) * ($nearlatitude[$ij] - floatval(urldecode($_GET['latitude']))) + ($nearlongitude[$ij] - floatval(urldecode($_GET['longitude']))) * ($nearlongitude[$ij] - floatval(urldecode($_GET['longitude']))); if ($thisll < $latlongdistsquared) { if ($best2 < 0) { $latlongdistsquaredtwo=$latlongdistsquared; $best2=$best1; $best1=$ij; $latlongdistsquared=$thisll; } else { $latlongdistsquaredthree=$latlongdistsquaredtwo; $latlongdistsquaredtwo=$latlongdistsquared; $best3=$best2; $best2=$best1; $best1=$ij; $latlongdistsquared=$thisll; } } else if ($thisll < $latlongdistsquaredtwo) { $latlongdistsquaredthree=$latlongdistsquaredtwo; $best3=$best2; $best2=$ij; $latlongdistsquaredtwo=$thisll; } else if ($thisll < $latlongdistsquaredthree) { $best3=$ij; $latlongdistsquaredthree=$thisll; } } } $coffs=[0,0,0]; if ($gcddistsquared >= 0.0) { $ret=""; $retmore=""; $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best1], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best1]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } if ($pd != "") { $ppd='
' . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . '
= 0.0) $ppd=str_replace("&altplace=", "&altplace=" . urlencode($nearname[$best2]), $ppd); if ($gcddistsquaredthree >= 0.0) $ppd=str_replace("&altplacethree=", "&altplacethree=" . urlencode($nearname[$best3]), $ppd); $pd=substr($pd,0,1) . str_replace('= 0.0) { $ppd='
' . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km from " . urldecode($_GET['place']) . '
' . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km from " . urldecode($_GET['place']) . '

Nearest Timezones ... RJM Programming ... April, 2018 ... //php.net/manual/en/datetimezone.getlocation.php




" . $pd . $ret . ""; exit; } $ret=str_replace("", ""); $retmore=str_replace("", ""); if ($gcddistsquaredtwo >= 0.0) $ret=str_replace("", "", $ret); if ($gcddistsquaredtwo >= 0.0) $retmore=str_replace("", "", $retmore); if ($gcddistsquaredthree >= 0.0) $ret=str_replace("", "", $ret); if ($gcddistsquaredthree >= 0.0) $retmore=str_replace("", "", $retmore); echo " function lookoutfortop() { if (parent.document.getElementById('getmell')) { parent.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\"; } else if (top.document.getElementById('nearest')) { if (top.document.getElementById('getmell')) { top.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\"; } else { top.document.getElementById('nearest').innerHTML=\"" . $pd . $ret . "\"; } top.window.scrollTo(0,0); } else { if (top.document.getElementById('getmell')) { document.body.innerHTML=\"" . $pd . $retmore . "\"; } else { document.body.innerHTML=\"" . $pd . $ret . "\"; } } } " . $pd . $ret . ""; //$ret; exit; } else if ($latlongdistsquared >= 0.0) { //echo $latlongdistsquared . " " . $latlongdistsquaredtwo; //exit; $ret=""; $retmore=""; $gcddistsquared=great_circle_distance(floatval(urldecode($_GET['latitude'])), floatval(urldecode($_GET['longitude'])), $nearlatitude[$best1], $nearlongitude[$best1]); $gcddistsquaredll=" data-ll='(" . $nearlatitude[$best1] . ',' . $nearlongitude[$best1] . ")' "; $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best1], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best1]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } if ($latlongdistsquaredtwo >= 0.0) { $ret=str_replace(" size=2 ", " size=3 ", $ret); $retmore=str_replace(" size=2 ", " size=3 ", $retmore); $gcddistsquaredtwo=great_circle_distance(floatval(urldecode($_GET['latitude'])), floatval(urldecode($_GET['longitude'])), $nearlatitude[$best2], $nearlongitude[$best2]); $gcddistsquaredtwoll=" data-ll='(" . $nearlatitude[$best2] . ',' . $nearlongitude[$best2] . ")' "; if ($latlongdistsquaredthree >= 0.0) { $ret=str_replace(" size=3 ", " size=4 ", $ret); $retmore=str_replace(" size=3 ", " size=4 ", $retmore); $gcddistsquaredthree=great_circle_distance(floatval(urldecode($_GET['latitude'])), floatval(urldecode($_GET['longitude'])), $nearlatitude[$best3], $nearlongitude[$best3]); $gcddistsquaredthreell=" data-ll='(" . $nearlatitude[$best3] . ',' . $nearlongitude[$best3] . ")' "; if ($gcddistsquared <= $gcddistsquaredtwo && $gcddistsquared <= $gcddistsquaredthree) { $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); if ($gcddistsquaredtwo <= $gcddistsquaredthree) { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best2], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best2]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best3], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best3])); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone($nearname[$best3]); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); } else { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best3], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best3])); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone($nearname[$best3]); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best2], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best2]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); } } else if ($gcddistsquaredtwo <= $gcddistsquared && $gcddistsquaredtwo <= $gcddistsquaredthree) { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best2], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best2]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); if ($gcddistsquared <= $gcddistsquaredthree) { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best1], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best1]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best3], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best3]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best3])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); } else { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best3], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best3]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best3])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best1], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best1]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); } } else { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best3], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best3]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best3])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); if ($gcddistsquared <= $gcddistsquaredtwo) { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best1], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best1]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best2], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best2]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); } else { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best2], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best2]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best1], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best1]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); } } } else if ($gcddistsquared <= $gcddistsquaredtwo) { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best1], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best1]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best2], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best2]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); } else { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best2], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best2]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best1], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best1]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $retmore); } } else { $otz = new DateTimeZone("UTC"); // "Europe/London" $frombad="Tskhinvali"; // "youllneverfindthis"; $tobad="Tbilisi"; if (strpos($namename[$best1], "/Tskhinvali") !== false) { try { $tz = new DateTimeZone($nearname[$best1]); $frombad="youllneverfindthis"; } catch(Exception $tyuhg) { $frombad="Tskhinvali"; } } $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1])); $origin_dt = new DateTime("now", $otz); $remote_dt = new DateTime("now", $tz); $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\""; $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; if ($offset < 0) { $coffset=$offset; } else { $coffset="+" . $offset; } $ret=str_replace("", "", $ret); $retmore=str_replace("", "", $ret); } if ($pd != "") { $ppd='
' . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . '
= 0.0) $ppd=str_replace("&altplace=", "&altplace=" . urlencode($nearname[$best2]), $ppd); if ($gcddistsquaredthree >= 0.0) $ppd=str_replace("&altplacethree=", "&altplacethree=" . urlencode($nearname[$best3]), $ppd); $pd=substr($pd,0,1) . str_replace('= 0.0) { $ppd='
' . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km from " . urldecode($_GET['place']) . '
' . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km from " . urldecode($_GET['place']) . '

Nearest Timezones ... RJM Programming ... April, 2018 ... //php.net/manual/en/datetimezone.getlocation.php




" . $pd . $ret . ""; exit; } if ($retmore == "") { $retmore=$ret; } echo " function lookoutfortop() { if (parent.document.getElementById('getmell')) { parent.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\"; } else if (top.document.getElementById('nearest')) { if (top.document.getElementById('getmell')) { top.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\"; } else { top.document.getElementById('nearest').innerHTML=\"" . $pd . $ret . "\"; } top.window.scrollTo(0,0); } else { document.body.innerHTML=\"" . $pd . $ret . "\"; } } " . $pd . $ret . ""; exit; } } } } } function toeng($indow,$zn) { return str_replace("7", "Sunday", str_replace("1", "Monday", str_replace("2", "Tuesday", str_replace("3", "Wednesday", str_replace("4", "Thursday", str_replace("5", "Friday", str_replace("6", "Saturday", ("" . substr($indow,0,1))))))))) . str_replace("~/~", $zn, substr($indow,1)); } function great_circle_distance($talis, $gnolis, $latis, $longis) { $ourdist=0.0; $rgnol=(($gnolis) * pi() / 180.0); $rtal=(($talis) * pi() / 180.0); $rlong=(($longis) * pi() / 180.0); $rlat=(($latis) * pi() / 180.0); $deltalong = abs(((($gnolis)-($longis)) * pi() / 180.0)); $acof = (sin($rtal) * sin($rlat)) + (cos($rtal) * cos($rlat) * cos($deltalong)); // via //en.wikipedia.org/wiki/Great-circle_distance ... thanks $ourdist = (round((acos($acof) * 6371000.0) + 0.00001) * 100) / 100; return $ourdist; } function localtimefromtogmt($indate, $fromtz, $totz) { // thanks to //stackoverflow.com/questions/13698779/timezone-with-dst-handling-by-php global $lastTime, $lastnonutc, $rightnow, $bestemojicodepoint, $thisemojicodepoint, $gmtdatetimeis, $gmthhris, $gmthris, $gmtminis, $bestemojiclass, $thisemojiclass; $thisemojiclass=""; if ($indate != "now" && (strpos($indate, "+") !== false || strpos($indate, "-") !== false || strlen($indate) <= 5)) { date_default_timezone_set('Australi' . 'a/Perth'); // YOUR timezone, of the server $date = new DateTime("now", new DateTimeZone('Australi' . 'a/Perth')); // USER's timezone $hoff=intval(str_replace('+','',$indate)) * 60; if ($hoff >= 0) { $minis=($hoff % 60); $hris=(($hoff - $minis) / 60); if (($gmtminis + $minis) >= 60) { if (((1 + $hris + $gmthhris) % 24) >= 12) { $thisemojiclass=" nighttime"; } $hris=($hris % 12) + 1; $minis=(($gmtminis + $minis) % 60); } else { if ((($hris + $gmthhris) % 24) >= 12) { $thisemojiclass=" nighttime"; } $minis=($gmtminis + $minis); } $hris=($gmthhris + $hris); if ($hris > 12) { $hris=($hris % 12); } } else { $minis=((0 - $hoff) % 60); $hris=(((0 - $hoff) - $minis) / 60); if (($gmtminis - $minis) < 0) { if (((-1 - $hris + 24 + $gmthhris) % 24) >= 12) { $thisemojiclass=" nighttime"; } $hris=($hris % 12) - 1; if ($hris == 0) $hris=12; $minis=(($gmtminis - $minis) + 60); } else { if ((($gmthhris - $hris + 24) % 24) >= 12) { $thisemojiclass=" nighttime"; } $minis=($gmtminis - $minis); } $hris=($gmthris - $hris); if ($hris < 1) $hris=($hris + 12); } if ($minis > 45 && $hris == 12) { $thisemojicodepoint=128336; } else if ($minis >= 45) { $thisemojicodepoint=128336 + $hris; } else if ($minis <= 15) { $thisemojicodepoint=128335 + $hris; } else { $thisemojicodepoint=128347 + $hris; } $zzb=""; if ($minis < 10) $zzb="0"; if ($thisemojiclass == " nighttime" && $hris < 12) { $lastTime=($hris + 12) . ':' . $zzb . $minis; } else { $lastTime=$hris . ':' . $zzb . $minis; } //echo $thisemojicodepoint; //exit; } else { date_default_timezone_set('Australi' . 'a/Perth'); // YOUR timezone, of the server if ($fromtz == 'UTC') { $date = new DateTime($indate, new DateTimeZone('UTC')); // USER's timezone $date->setTimezone(new DateTimeZone($totz)); } else { //echo $fromtz; //exit; if ($fromtz == 'Australi' . 'a/Perth') { $date = new DateTime($indate); } else { echo '*' . $fromtz . '*'; exit; $date = new DateTime($indate, new DateTimeZone($fromtz)); // USER's timezone } $date->setTimezone(new DateTimeZone('UTC')); if ($totz != 'UTC') { $lastnonutc=$totz; $date = localtimefromtogmt($date, 'UTC', $totz); } else { // 1 o'clock is 🕐 // 2 o'clock is 🕑 // 12 o'clock is 🕛 // 2:30 is 🕝 // 11:30 is 🕦 // 12:30 is 🕧 $gmtdatetimeis=$date->format('D Y-m-d H:i:s') . " GMT at time of first display"; $hrntis=intval($date->format('H')); $gmthhris=$hrntis; $bestemojiclass=""; if ($hrntis >= 12) $bestemojiclass=" nighttime"; $hris=intval($date->format('h')); $minis=intval($date->format('i')); $gmthris=$hris; $gmtminis=$minis; if ($minis > 45 && $hris == 12) { $bestemojicodepoint=128336; } else if ($minis >= 45) { $bestemojicodepoint=128336 + $hris; } else if ($minis <= 15) { $bestemojicodepoint=128335 + $hris; } else { $bestemojicodepoint=128347 + $hris; } $zzb=""; if ($minis < 10) $zzb="0"; if ($bestemojiclass == " nighttime" && $hris < 12) { $lastTime=($hris + 12) . ':' . $zzb . $minis; } else { $lastTime=$hris . ':' . $zzb . $minis; } //echo $bestemojicodepoint; } } } return $date; //->format('Y-m-d H:i:s'); } function ourtimezonelist($ididea) { // thanks to //php.net/manual/en/function.timezone-identifiers-list.php global $lastTime, $rightnow, $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="
"; } else { $prefix="" . $yourmapstuff . "
"; } $hprefix=""; $suffix=""; $ourmapstuff=""; $yourmapstuff=""; $formstuff=""; $extrad=""; $timezone_abbreviations = DateTimeZone::listAbbreviations(); foreach ($timezone_abbreviations["est"] as $tzo) { $betteroff=0; $okay=false; //echo str_replace("+","",urldecode($_GET['tzname'])) . ' ' . ('' . ($tzo['offset'] / 3600)) . ' ' . $tzo['timezone_id']; //exit; //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']); $bnow = new DateTime(null, $tz); $betteroff=$bnow->getOffset(); //echo "betteroff=" . $betteroff . " And tzo[offset]=" . $tzo['offset'] . " "; $okay=true; //if (strpos($tzo['timezone_id'], "Auckland") !== false) { // echo "A " . $tzn . ' ' . $tzo['timezone_id']; // exit; //} } else if (str_replace("+","",urldecode($_GET['tzname'])) == ('' . ($tzo['offset'] / 3600))) { $tz = new DateTimeZone($tzo['timezone_id']); $bnow = new DateTime(null, $tz); $betteroff=$bnow->getOffset(); //echo "betteroff=" . $betteroff . " And tzo[offset]=" . $tzo['offset'] . " "; $okay=true; //if (strpos($tzo['timezone_id'], "Auckland") !== false) { // echo "B " . $tzn . ' ' . $tzo['timezone_id']; // exit; //} } //else { //if (strpos($tzo['timezone_id'], "Auckland") !== false) { // echo "C " . $tzo['offset'] . " " . $tzn . ' ' . $tzo['timezone_id']; // exit; //} //} if ($okay) { $zoneName = $tzo['timezone_id']; $loc = $tz->getLocation(); if ($loc[latitude] != 0 || $loc[longitude] != 0) { if ($betteroff < 0) { $coffset=($betteroff / 3600); } else { $coffset="+" . ($betteroff / 3600); } //echo "bEtteroff=" . $betteroff . " And coffset=" . $coffset . " "; //if ($tzo['offset'] < 0) { // $coffset=($tzo['offset'] / 3600); //} else { // $coffset="+" . ($tzo['offset'] / 3600); //} $zbits=explode("/",$zoneName); if ($ourmapstuff == "") { $formstuff=""; //$ourzoneName=$zoneName; if (isset($_GET['lat']) && isset($_GET['long']) && isset($_GET['place'])) { //$places=$_GET['place']; //$zbits[-1 + sizeof($zbits)]=$places; //$ourzoneName=$places; //$loc[latitude]=urldecode($_GET['lat']); //$loc[longitude]=urldecode($_GET['long']); $wlinkh=""; if (isset($_GET['wlink'])) $wlinkh=""; //localtimefromtogmt(('' . $tzo['offset'] / 3600), 'Australi' . 'a/Perth', 'UTC'); //if ($rightnow != "") $wlinkh.=""; if ($formstuff == "") $formstuff="
" . $wlinkh . "
function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); "; $formstuff=str_replace('" name="data"', ',[' . urldecode($_GET['lat']) . ',' . urldecode($_GET['long']) . ',~' . $_GET['place'] . '~]" name=data', $formstuff); $ourmapstuff="
       
document.getElementById('smapif').click(); "; } if ($ourmapstuff == "") $ourmapstuff="
       
document.getElementById('smapif').click(); "; $yourmapstuff="
       "; //$formstuff="
function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); "; if ($formstuff == "") $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(">getOffset(); //echo "betteroff=" . $betteroff . " And tZo[offset]=" . $tzo['offset'] . " "; //$extrad="
"; $extrad="
"; } else { // new $tzq = new DateTimeZone($zoneName); $bnow = new DateTime(null, $tzq); $betteroff=$bnow->getOffset(); //echo "betteroFf=" . $betteroff . " And tzo[offset]=" . $tzo['offset'] . " "; } if ($prepretitlebit == "") $prepretitlebit=$loc['country_code']; $pretitlebit=explode('"' . $prepretitlebit . '">', $sellong)[1]; $titlebit=explode("<", $pretitlebit)[0] . "/" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . ',' . $loc[latitude] . ',' . $loc[longitude] . ',' . ($tzo['offset'] / 3600); //localtimefromtogmt(('' . $tzo['offset'] / 3600), 'Australi' . 'a/Perth', 'UTC'); localtimefromtogmt(('' . $betteroff / 3600), 'Australi' . 'a/Perth', 'UTC'); if (strpos($titlebit,"Optionally Select Country of Interest below ...") !== false) { $selstuff.=$prefix . " " . $zoneName . "
📹
" . $extrad . " = " . $loc['comments'] . " ... " . $coffset . "
" . str_replace("&#;","","&#" . $thisemojicodepoint . ";") . "
" . $suffix . "
"; } else { $selstuff.=$prefix . " " . $zoneName . "
📹
" . $extrad . " = " . $loc['comments'] . " ... " . $coffset . "
" . str_replace("&#;","","&#" . $thisemojicodepoint . ";") . "
" . $suffix . "
"; } $prefix=""; $suffix=""; } } //if (strpos($tzo['timezone_id'], 'Auckland') !== false) { // echo str_replace("+","",urldecode($_GET['tzname'])) . ' ' . ('' . ($tzo['offset'] / 3600)) . ' ' . $tzo['timezone_id']; // exit; //} } $selstuff.="

"; $ididea="tzs"; //if (strpos($hprefix, "'; for ($xoff=-24.0; $xoff<=24.0; $xoff+=0.5) { $selstuff=str_replace("", "", $selstuff); } $versus=file_get_contents("tz_places.php"); $zzxc='"Australia' . '/' . 'Perth","Antarctica' . '/' . 'Troll","Asia' . '/' . 'Chita","Asia' . '/' . 'Khandyga","Asia' . '/' . 'Srednekolymsk","Asia' . '/' . 'Ust-Nera","Europe' . '/' . 'Busingen","Pacific' . '/' . 'Bougainville","America' . '/' . 'Fort_Nelson","Asia' . '/' . 'Atyrau","Asia' . '/' . 'Barnaul","Asia' . '/' . 'Famagusta","Asia' . '/' . 'Tomsk","Europe' . '/' . 'London","America' . '/' . 'Punta_Arenas"'; $zzlat='"-31.95","-72.01139","52.05","62.65638","67.46666","64.56027","47.69999","-6.21667","58.8","47.11666","53.36666","35.11666","56.5","51.5074","-53.15"'; $zzlong='"115.85","2.535","113.46666","135.55388","153.71666","143.22666","8.68333","155.56666","-122.7","51.93333","83.75","33.95","84.96666","-0.1278","-70.91667"'; $zzlast='"AWST","+02","+09","+09","+11","+10","CEST","+11","MST","+05","+07","EEST","+07","BST","-03"'; $zzthree='"AU","AQ","RU","RU","RU","RU","DE","PG","CA","KZ","RU","CY","RU","UK","CL"'; $zones = timezone_identifiers_list(); foreach ($zones as $zone) { $origzone=$zone; //$ourtz=new DateTimeZone($zone); $zzbit=$zone; //$ootz = new DateTimeZone($zone); //$oocloc = $ootz->getLocation(); //$ooctrycode = $oocloc['country_code']; $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]) != '') { if (strpos($versus, '"' . $zzbit . '"') === false && strpos($versus, '"' . '' . '"];') !== false && strpos($versus, '"' . ' ' . '"];') !== false && strpos($versus, '"' . ' ' . '"];') !== false) { $ourtz=new DateTimeZone($zzbit); $versus=str_replace('"' . '' . '"];', '"' . $zzbit . '","' . '' . '"];', $versus); $versus=str_replace('"' . ' ' . '"];', '"' . $ourtz->getLocation()[latitude] . '","' . ' ' . '"];', $versus); $versus=str_replace('"' . ' ' . '"];', '"' . $ourtz->getLocation()[longitude] . '","' . ' ' . '"];', $versus); if (sizeof($zone) == 3) { $abbr=""; try { $zzdt = new DateTime('now', new DateTimeZone($zone[0] . '/' . $zone[1] . '/' . $zone[2])); //$zzbit)); $abbr = $zzdt->format('T'); //exec("ksh -c 'TZ=" . $zone[0] . '/' . $zone[1] . '/' . $zone[2] . " date > x.x'"); } catch (Exception $eonee) { $abbr=""; } if ($abbr == "") { $abbr="UTC"; } } else { $abbr=""; try { $zzdt = new DateTime('now', new DateTimeZone($zone[0] . '/' . $zone[1])); //$zzbit)); $abbr = $zzdt->format('T'); //exec("ksh -c 'TZ=" . $zone[0] . '/' . $zone[1] . " date > x.x'"); } catch (Exception $etwoe) { $abbr=""; } if ($abbr == "") { $abbr="UTC"; } } $versus=str_replace('"' . ' ' . '"];', '"' . $abbr . '","' . ' ' . '"];', $versus); if (strpos($zzbit, "/Wallis") !== false) { $versus=str_replace('"' . '' . '"];', '' . $zzxc . ',"' . '' . '"];', $versus); $versus=str_replace('"' . ' ' . '"];', '' . $zzlat . ',"' . ' ' . '"];', $versus); $versus=str_replace('"' . ' ' . '"];', '' . $zzlong . ',"' . ' ' . '"];', $versus); $versus=str_replace('"' . ' ' . '"];', '' . $zzlast . ',"' . ' ' . '"];', $versus); $versus=str_replace('"' . ' ' . '"];', '' . $zzthree . ',"' . ' ' . '"];', $versus); } @file_put_contents("tz_places.php", $versus); echo ''; //header("Location: ./tz_places.php?upto=" . $zzbit); exit; } //$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); //$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; } if (isset($_GET['upto'])) { ourtimezonelist($ideais); } find_nearest(); $cnarr="\n var cnearname='" . '"' . $nearname[0] . '"'; for ($narr=1; $narr TimeZone Places - RJM Programming - December, 2016 ... Thanks to //php.net/manual/en/datetimezone.getlocation.php and //stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name