function NewDate(str) {
if ((typeof str) == "string") {
str = str.split(' ');
var year = str[0].split('-');
var time = str[1].split(':');
var date = new Date();
date.setUTCFullYear(year[0], year[1] - 1, year[2]);
date.setUTCHours(time[0], time[1], time[2], 0);
return date.getTime();
}
}
网友评论