The following code should result in a time of 0ms

var d1:Date = new Date();
var d2:Date = d1;
                                                                
var result:Date = new Date();
result.time = d2.valueOf() - d1.valueOf();

The odd thing is that there is a 1 hour difference.
The timezoneOffset of d1 and d2 is -120
But the timezoneOffset of result is -60.

Why does the result have a different timezoneOffset? 

Is there another way of calculation time differences?

Many thanks.






-120






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to