import console;
var num = 1475929480;
console.log(num,time(num,"%Y-%m-%d %H:%M:%S") );
console.pause(true);
通过时间戳返回时间
通过网站的返回头文件获取时间
getTime = function(url){
var whttp = inet.whttp()
whttp.beginRequest(url,"GET")
whttp.send()
var da = whttp.readHeader("Date")
setlocale("time","enu")
var tm = time(da,"%a, %d %b %Y %H:%M:%S")
setlocale("time","chs")
tm = time(tonumber(tm))
tm.format="!%c";//说明这是一个UTC时间
tm.local(); //转换为本地时间
tm.format= "%Y-%m-%d %H:%M:%S"
return tm;
}