This is seriously killing me. I'm trying to convert a Unix timestamp (1236268800, which equates to Thu, 05 Mar 2009 16:00:00 GMT) to a Date object in Flex.
var timestamp:Number = 1236268800;
trace(new Date(timestamp));
Output: Wed Jan 14 23:24:28 GMT-0800 1970
Also tried this:
var timestamp:Number = 1236268800;
var date:Date = new Date;
date.time = timestamp;
trace(date);
Output: Wed Jan 14 23:24:28 GMT-0800 1970
Either of those methods should work. What am I doing wrong here?
you have to convert to milliseconds, multiply that by 1000