var current = new Date();
var d1 = new Date(current.getYear(),1,1,7,30,0);//new Date(year,month,day,hour,minute,second)
var d2 = new Date(current.getYear(),1,1,0,0,0);var time= d1.getTime()-d2.getTime()+current.getTimezoneOffset()*60000;
这样time传到java后台就是Time类型了,如果不加current.getTimezoneOffset()*60000,时间会差8小时,就是我们的时区了