sizeof($numcommas)) { $addchange=" if (parent.document.getElementById('tz').value == '" . $intz . "') { parent.document.getElementById('tz').value='" . str_replace('"','',str_replace("'","",$tzlist[-1 + sizeof($numcommas)])) . "'; } "; $good=str_replace('"','',str_replace("'","",$tzlist[-1 + sizeof($numcommas)])); $goods=explode("/", $good); if (strpos($tzcont, $atleast[0] . '"' . $words[0] . '",') !== false) { $tzcont=str_replace($atleast[0] . '"' . $words[0] . '",', $atleast[0] . '"#@$",', $tzcont); $onevs=strtoupper("/" . str_replace("_", " ", str_replace("-", " ", $goods[-1 + sizeof($goods)]))); if (sizeof($words) > 1) { $twovs=strtoupper("/" . str_replace("_", " ", str_replace("-", " ", substr($outtz, (1 + strlen($words[0])))))); } if (sizeof($words) <= 1) { $unresolved=false; } else if (sizeof($words) == 2 && strlen($words[1]) == 2) { $tz = new DateTimeZone($good); $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; if (strtoupper($ctrycode) == strtoupper($words[1])) { $unresolved=false; } } else if (strpos($onevs, $twovs) !== false) { $unresolved=false; } } else { $unresolved=false; } } } else { $unresolved=false; } } } } } if ($good != "") { return $good; } return $outtz; } if (!isset($argc)) { if (isset($_GET['tz'])) { $fgtz=firstof(str_replace("+"," ",urldecode($_GET['tz']))); } $scr=""; if (isset($_GET['tz'])) { //while (1) { //sleep(1); if ($qm == "#") { echo "

" . passthru("date") . "

" . $scr . ""; } else { echo "

" . passthru("TZ=" . $fgtz . " date") . "

" . $scr . ""; } //} //exit; } else { echo "" . $scr . "

"; } } else { if (file_exists("stop_x1.x1")) { unlink("stop_x1.x1"); } $line = readline("Optionally specify timezone that is not your local one eg. Europe/Berlin (else return): "); if (strpos(trim($line), "/") !== false) { file_put_contents("stop_x1.x1", ""); sleep(2); exec("TZ=" . $line . " ./x1 " . $line); exit(1); } else { exit(0); } } ?>