<!doctype html>
<html>
<head>
<title>Daylight Saving Time Information - RJM Programming - September, 2015 - Thanks go to http://gomashup.com and https://en.wikipedia.org/wiki/List_of_tz_database_time_zones</title>
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<style> td { text-align: center; } table { border: 5px teal solid; } </style>
<script type='text/javascript'>
var callback=false;
var timezone=0;
var place="";
var region="";
var firsttime=true;
var wois=null;
var isok=-1;
var lastis="";
var lasttitle="";
timezone=location.search.split('timezone=')[1] ? location.search.split('timezone=')[1].split('&')[0] : -99;
place=location.search.split('place=')[1] ? location.search.split('place=')[1].split('&')[0] : place;
region=location.search.split('region=')[1] ? location.search.split('region=')[1].split('&')[0] : region;
if (timezone != -99) firsttime=false;
function prerepos() {
if (isok == -1) {
var r = confirm("Press OK to show places on a Google Map for this session, or Cancel to show Timezone information.");
if (r == true) {
isok=1;
} else {
isok=0;
document.getElementById('thgm').style.display='none';
}
}
document.getElementById('label').value="['Lat',";
document.getElementById('value').value="'Lon', 'Name']";
document.getElementById('data').value+=(lasttitle);
//document.getElementById('data').innerHTML+=decodeURIComponent(lasttitle);
if (isok == 1) {
var mysrc=document.getElementById('myform').action;
mysrc+="?title=" + document.getElementById('title').value;
mysrc+="&label=" + document.getElementById('label').value;
mysrc+="&value=" + document.getElementById('value').value;
mysrc+="&data=" + document.getElementById('data').value;
if (mysrc.length < 400) {
document.getElementById('mapif').style.display='block';
document.getElementById('mapif').src=mysrc;
} else {
document.getElementById('mapsubmit').click();
}
}
return isok;
}
function repos() {
if (isok == 1) {
window.scrollTo(0,0);
}
if (wois != null) {
wois=wois;
}
}
function process() {
var iois=document.getElementById('myiframe');
var disp=true;tzi="", dst="", gmt="";
var i, badresult="Sorry, but no data found, even though we tried looking very very very hard.", stuff, dqstuff;
var tablestuff="<table><thead><tr><th>Time Zone ID</th><th>Daylight Saving Time (Now)</th><th>Greenwich Mean Time(zone)</th></tr></thead><tbody></tbody></table>";
var pt=tablestuff;
try {
if (iois != null) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
//document.getElementById('result').innerHTML="";
stuff=aconto.body.innerHTML.split(" : ");
if (stuff.length > 1) {
for (i=1; i<stuff.length; i+=3) {
dqstuff=stuff[i].split('"');
tzi=dqstuff[1];
dqstuff=stuff[eval(1 + i)].split('"');
dst=dqstuff[1];
dqstuff=stuff[eval(2 + i)].split('"');
gmt=dqstuff[1];
disp=true;
if (region != "") {
if (("~" + tzi).indexOf("~" + region + "-") == -1) disp=false;
}
if (place != "") {
if (tzi.toLowerCase().replace(/_/g,' ').indexOf(place.toLowerCase().replace(/_/g,' ')) == -1) disp=false;
}
if (disp) {
tablestuff=tablestuff.replace("</tbody>", "<tr><td>" + tzi + "</td><td>" + dst + "</td><td>" + gmt + "</td></tr></tbody>");
}
}
}
if (pt != tablestuff) document.getElementById('result').innerHTML=tablestuff;
badresult="";
}
}
}
if (badresult != "") document.getElementById('result').innerHTML=badresult;
} catch (ee) { }
}
function checkforcallback() {
if (timezone == -99) {
timezone=10;
} else {
firsttime=false;
callback=true;
document.getElementById('timezone').value = timezone;
document.getElementById('place').value = place;
document.getElementById('region').value = region;
//alert("./daylight_saving_time.php?url=" + encodeURIComponent('http://gomashup.com/json.php?fds=geo/timezone/gmt/' + timezone + '&jsoncallback=?'));
document.getElementById('myiframe').src="./daylight_saving_time.php?url=" + encodeURIComponent('http://gomashup.com/json.php?fds=geo/timezone/gmt/' + timezone + '&jsoncallback=?');
//setTimeout(process,2000);
}
}
function fixit(tval) {
document.getElementById('url').value='http://gomashup.com/json.php?fds=geo/timezone/gmt/' + tval + '&jsoncallback=?';
}
</script>
</head>
<body style='background-color: lightgreen;' onload'checkforcallback();'>
<h1 align='center'>Daylight Saving Time Information - RJM Programming - September, 2015</h1>
<h3 align='center'>Thanks to <a target=_blank title='Gomashup.com' href='http://www.gomashup.com'>GoMashup</a> and <a target=_blank title='Wikipedia Timezone page ... thanks' href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>Wikipedia</a></h3>
<h4 align='center'>Check out Timezone Places or Check a Particular Place</h4>
<div align='center'>
<form target='myiframe' action='./daylight_saving_time.php' method='GET'>
Timezone (nominal hours from GMT): <select onchange='fixit(this.value);' id='timezone' name='timezone'><option value=''>Please select a timezone below ...</option>
<option value='-18'>-18</option>
<option value='-17'>-17</option>
<option value='-16'>-16</option>
<option value='-15'>-15</option>
<option value='-14'>-14</option>
<option value='-13'>-13</option>
<option value='-12'>-12</option>
<option value='-11'>-11</option>
<option value='-10'>-10</option>
<option value='-9'>-9</option>
<option value='-8'>-8</option>
<option value='-7'>-7</option>
<option value='-6'>-6</option>
<option value='-5'>-5</option>
<option value='-4'>-4</option>
<option value='-3'>-3</option>
<option value='-2'>-2</option>
<option value='-1'>-1</option>
<option value='0'>Greenwich Mean Time</option>
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
<option value='6'>6</option>
<option value='7'>7</option>
<option value='8'>8</option>
<option value='9'>9</option>
<option value='10'>10</option>
<option value='11'>11</option>
<option value='12'>12</option>
<option value='13'>13</option>
<option value='14'>14</option>
<option value='15'>15</option>
<option value='16'>16</option>
<option value='17'>17</option>
<option value='18'>18</option>
</select><br><br>
Place (optional - can be a state): <input type='text' name='place' id='place' value=''></input><br><br>
Region (optional): <select id='region' name='region'><option value=''>Optionally, please select a region below ...</option>
<option value='Africa'>Africa</option>
<option value='America'>America</option>
<option value='Antarctica'>Antarctica</option>
<option value='Arctic'>Arctic</option>
<option value='Asia'>Asia</option>
<option value='Atlantic'>Atlantic</option>
<option value='Australia'>Australia</option>
<option value='Europe'>Europe</option>
<option value='Indian'>Indian</option>
<option value='Pacific'>Pacific</option>
</select>
<input name='url' id='url' type='hidden' value='http://gomashup.com/json.php?fds=geo/timezone/gmt/&jsoncallback=?'></input>
<br><br><input onclick='setTimeout(process,2000);' style='background-color:orange;' type='submit' value='Show Results Below'></input>
</form> <br><br>
</div>
<iframe name='myiframe' style='display:none;' onload=' if (firsttime) { firsttime=false; } else if (1 == 2) { setTimeout(process,2000); }' style='width:100%;' id='myiframe' src=''></iframe>
<div align='center' id='result' style='background-color:yellow;'></div>
</body>
</html>