as3 unixtime

2011年8月21日 星期日 by Hu, Ching-Hsiang


var myDate = new Date();
trace(myDate);
var unixTime = Math.round(myDate.getTime()/1000);
trace("Unix Time: "+unixTime);

var dateNew = new Date();
dateNew.setTime(unixTime);
trace(dateNew);

Filed under having  

0 意見: