.....
<button id="button">отправить время</button>
.....
<script>
button.onclick = function() {
var date = new Date();
var h = ((date.getHours() < 10) ? '0' : '') + date.getHours();
var m = ((date.getMinutes() < 10) ? '0' : '') + date.getMinutes();
var s = ((date.getSeconds() < 10) ? '0' : '') + date.getSeconds();
var time = h + '+' + m + '+' + s;
location = '?time=' + time;
};
</script>
.....