i have this function
var countt = count, time = count.data('countdown'), format = count.data('format');
var Otime = new Date(time), o = {
serverSync: serverTime,
until:Otime,
// demo data set to reset timer, when it's finished
// change zeroCallback to prefered callback
zeroCallback: function(options) {
}
};
if(format){
$.extend(o,{format:format});
}else{
$.extend(o,{layout: '{dn} {dl} {hnn}{sep}{mnn}{sep}{snn}'});
}
count.countdown(o)
}
i want to add 10 seconds to this var Otime = new Date(time)
i am looking for something like
var Otime = new Date(time) + 10 seconds
is there an appropriate way to do it?
EDIT:
function change_date(count)
{
var serverTime = function() {
var time = null;
$.ajax({
url: 'index.php',
async: false,
dataType: 'text',
data:{
page:'__request',
module:'PSF_auctions',
action:'get_server_time'
},
success: function(text) {
time = new Date(text);
},
error: function(http, message, exc) {
time = new Date();
}
});
return time;
}
this returns time variable, which is the current system time