var date = new Date();
var itog="20"+(date.getYear()+"").replace(/.+?(\d\d)$/g,'$1')+"-"+("0"+""+(1+date.getMonth())).replace(/.?(\d\d)/g,'$1')+"-"+("0"+""+date.getDate()).replace(/.?(\d\d)/g,'$1')+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
alert( itog)