So far as I can tell PHP has no part to play in this solution, since it'll be client-side (given the JavaScript requirement), however one method, using jQuery with the following HTML snippet:
<span id="time">18:00</span>
<select name="modTime" id="modTime">
<option value="-3">-3</option>
<option value="-2">-2</option>
<option value="-1">-1</option>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
jQuery:
var curTime = $('#time').text(),
curTimeHH = parseInt(curTime.split(':')[0],10);
$('#modTime').change(
function(){
var modifyBy = parseInt($(this).val(),10);
curTimeHH = curTimeHH + modifyBy;
$('#time').text(curTimeHH + ':00');
});
JS Fiddle demo.
Edited in response to question from OP (in comments, below):
...but it should always add or subtract relative to the original value, if that makes sense. And when you select "0" it should go back to what it originally was. Is that possible?
Yeah, that's possible; it's all about making sure the original time is stored somewhere accessible (you could use just a regular JavaScript variable, but I'm choosing instead to store it in a HTML5 data-* attribute:
var curTime = $('#time').text(),
curTimeHH = parseInt(curTime.split(':')[0],10);
$('#modTime').change(
function(){
$(this).attr('data-originalTime',curTime);
var modifyBy = parseInt($(this).val(),10);
curTimeHH = parseInt($(this).attr('data-originalTime'),10) + modifyBy;
$('#time').text(curTimeHH + ':00');
});
JS Fiddle demo.
References:
idattribute, orclass?