已解决! var myDate = new Date();//获取系统时间
var years=myDate.getFullYear();//年
var months=myDate.getMonth();//月
var day1=myDate.getDate()-1;//日
var hour = myDate.getHours();//时
var minute = myDate.getMinutes(); //分
var second = myDate.getSeconds();//秒
var riqi_s = years+"-"+months+"-"+ "01" + " " + "17:00:00"
var riqi_e = years+"-"+months+"-"+ day1 + " " + "17:00:00"