<html>
<head>
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
<!--
function pad
{
n = n.toString();
if (n.length == 1)
{
return '0' + n.toString();
}
return n.toString();
}
function load()
{
var d = new Date();
var y = d.getFullYear();
document.f.TTY.value = (y-2000);
document.f.TTM.value = d.getMonth();
document.f.TTD.value = d.getDate();
document.f.TTh.value = d.getHours();
document.f.TTm.value = d.getMinutes();
document.f.TTs.value = d.getSeconds();
var m = 0;
var o = 0;
if ((y > 2010) && (y < 2200))
{
//Place Daylight Savings data here.
//m is dst start day, o is dst end date.
//Data below is dst dates for Norway.
if (y == 2010) {m = 28; o = 31;}
if (y == 2011) {m = 27; o = 30;}
if (y == 2012) {m = 25; o = 28;}
if (y == 2013) {m = 31; o = 27;}
if (y == 2014) {m = 30; o = 26;}
if (y == 2015) {m = 29; o = 25;}
if (y == 2016) {m = 27; o = 30;}
if (y == 2017) {m = 26; o = 29;}
if (y == 2018) {m = 25; o = 28;}
if (y == 2019) {m = 31; o = 27;}
document.f.DYD.value = m;
document.f.DYd.value = o;
document.f.DYF.value = 1;
document.getElementById('fxx').innerHTML = 'Javascript works! '+y+' DST data loaded.<br />';
} else
{
document.f.DYF.value = 0;
document.getElementById('fxx').innerHTML = 'Javascript works! No DST data tho :-/<br />';
}
}
//-->
</script>
</head>
<body onload="javascript:load();">
<noscript>Enable javascript to automatically load system time, date and dst's.</noscript>
<FORM ACTION="http://192.168.0.1/cgi-bin/sntp" METHOD=GET NAME="f">
<input type="hidden" name="RC" value="@sntp">
<input type="hidden" name="rd" value="x">
<input type="hidden" name="TS" value="">
<input type="hidden" name="tz" value="15">
<input type="hidden" name="TZ" value="60">
<input type="hidden" name="TE" value="0">
<table border="1">
<tr><td>
<h1>DI 604 Set time</h1>
Year: <select name="TTY">
<option value="11">2011</option>
<option value="12">2012</option>
<option value="13">2013</option>
<option value="14">2014</option>
<option value="15">2015</option>
<option value="16">2016</option>
<option value="17">2017</option>
<option value="18">2018</option>
<option value="19">2019</option>
</select>
- Month <select name="TTM">
<option value="0">Jan</option>
<option value="1">Feb</option>
<option value="2">Mar</option>
<option value="3">Apr</option>
<option value="4">May</option>
<option value="5">Jun</option>
<option value="6">Jul</option>
<option value="7">Aug</option>
<option value="8">Sep</option>
<option value="9">Oct</option>
<option value="10">Nov</option>
<option value="11">Dec</option>
</select>
- Day: <input type="text" name="TTD" value="14" length="2" size="2"> (1-31)<br>
<p>
Hour: <input type="text" name="TTh" value="21" length="2" size="2"> (0-23)<br>
Minutes: <input type="text" name="TTm" value="31" length="2" size="2">(0-59)<br>
Seconds: <input type="text" name="TTs" value="01" length="2" size="2">(0-59)<p>
</td><td>
<h1>DST</h1>
<select name="DYF">
<option value="1">active</option>
<option value="0" selected>disabled</option>
</select><p>
DST Start month: <input type="text" name="DYM" value="2" length="2" size="2"> (0-11)<br>
DST Start day: <input type="text" name="DYD" value="" length="2" size="2"> (1-31)<br>
DST end month: <input type="text" name="DYm" value="9" length="2" size="2"> (0-11)<br>
DST end day: <input type="text" name="DYd" value="" length="2" size="2"> (1-31)<br>
</td></tr></table>
<input type="submit"><p>
</form>
<div id='fxx'></div>
</body></html>