var t = new Date();
var t_m = t.getMonth();
var t_d = t.getDate();
var t_h = t.getHours();
var t_mi = t.getMinutes();
var t_s = t.getSeconds();
var today = Math.ceil(( new Date() - new Date(new Date().getFullYear().toString()))/(24*60*60*1000))-1;
var d = 24*60*60;
var h = 60*60;
var s = 60;
var now = Date.parse(t)/1000;
now-t_h*h-t_mi*s-t_s //获取今日0时0分0秒时间戳
now-today*d-t_h*h-t_mi*s-t_s //获取今年0时0分0秒时间戳