function timenow() {
var d = new Date(), str = '';
str += d.getFullYear() + '-';
str += d.getMonth() + 1 + '-';
str += d.getDate();
return str;
}