UnixTimeStamp is seconds from epoch, 
Date is milliseconds from epoch, 

So multiply or divide by 1000 as appropriate.


--- In [email protected], Rico Leuthold <[EMAIL PROTECTED]> 
wrote:
>
> Ok ... sorry,
> 
> Figured it out. You have to multiply the unix timestamp with 1000 
and  
> it works. No clue why ... but it works.
> 
> _rico
> 
> 
> On 23.10.2007, at 12:48, rleuthold wrote:
> 
> > Hi,
> >
> > If I understood the API for Date right, it should be possible to  
> > pass a unix time stamp (as a
> > number and as the one and only argument) to the constructor and  
> > then have a "normal" date
> > object.
> >
> > I try this:
> > testDate:Date = new Date(1180166923);
> >
> > trace(testDate) // output: Wed Jan 14 16:49:26 GMT+0100 1970
> >
> > If I convert the timestamp (e.g. on the 
web:http://www.4webhelp.net/ 
> > us/timestamp.php?
> > action=stamp&stamp=1180166923&timezone=1)
> >
> > I get: Saturday, May 26th 2007, 9:08:43 (GMT +1) ... which is 
the  
> > date I want
> >
> > What am I missing here ? Thanks.
> >
> > _rico
> >
> >
> > 
> 
> ...................................
> Rico Leuthold
> [EMAIL PROTECTED]
> +41(0)76 512 05 50
> ...................................
>


Reply via email to