身思乐,人事爱,稳恒不言败!

js时间转Unix时间戳(Unix timestamp)

Math.round(new Date(1451606400000).getTime()/1000);
1451606400
Math.round(new Date('2016-01-01').getTime()/1000);
1451606400