<%
Function ToUnixTime(strTime, intTimeZone)
If IsEmpty(strTime) or Not IsDate(strTime) Then strTime = Now
If IsEmpty(intTimeZone) or Not isNumeric(intTimeZone) Then intTimeZone = 0
ToUnixTime = DateAdd("h",-intTimeZone,strTime)
ToUnixTime = DateDiff("s","1970-01-01 00:00:00", ToUnixTime)
End Function
%>
ToUnixTime("2018-09-18 16:31:29",+8)
输出:1537259489
Date aaaa = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2018-09-18 16:31:29");
System.out.println(aaaa.getTime());
输出:1537259489000
SO:看颜色