js.getTime() returns ticks since 1.1.1970 however .net ticks since 1.1.2000.
I had a case where every clicks is recorded on client and processed on the server. Here is how i convert js ticks to c# ticks.
Js Code
tracking.StartTime = new Date().getTime() – new Date().getTimezoneOffset() * 60 * 1000;
C# Code
const long ticks1970 = 621355968000000000;
DateTime startTime = new DateTime((Convert.ToInt64(ta.StartTime) * TimeSpan.TicksPerMillisecond) + ticks1970);
happy coding.
by the way, the code has some errors.