ViewBag.x = new TimeSpan(someDate.Ticks).TotalMilliseconds;
new Date( 63461023004794 )
Your .NET code is giving you the number of milliseconds since Jan. 1st, 0001.
The easiest thing would probably be to change your .NET code to:
ViewBag.x = (someDate - new DateTime(1970, 1, 1)).TotalMilliseconds;