Static News Archive



   (9-Dec-08 16:50)  Javascript rounds long ints!
While working on some realtime javascript connectivity stuff, I came across an issue where .Net DateTime.Tick values were not being correctly passed to the client side.

The effect of this was that javscript was calling urls with incorrect tick values.

Initially I thought it was a caching problem, until I put some alerts and document writes in and found that javascript rounds longs!

Try this:

alert(633645021830345300);
alert(633645021830345312);
alert(633645021830345323);



All three calls will produce "633645021830345300"..........

-Rob-
Post a comment     

<-  (22-Nov-08 22:51)  Restarting wireless ... (15-Jan-09 21:49)  The time spent maki...  ->













(sitemap)