if I trace new Date().toUTCString() I get something like: Fri Aug 12 07:14:06 2011 UTC. perfect. If I trace new Date().getTime() I get some long negative number which is decreasing as I continue to trace it. This is totally unexpected. Obviously my system clock is OK. What gives?
if I trace new Date().toUTCString() I get something like: Fri Aug 12 07:14:06 2011
Share
new Date().getTime()returns time in milliseconds from January 1, 1970, universal time. It is positive number but I suppose you’re usingintto store it so Flash Player converts milliseconds to negative as far as it is more thanint.MAX_VALUE. UseNumberto store the value ofnew Date().getTime()and it will be positive.