private static readonly long UnixEpochTicks = (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).Ticks; public static long ToJavascriptTicks(DateTime value) { return (value.ToUniversalTime().Ticks - UnixEpochTicks) / 10000; }
293100cookie-checkC# DateTime to Javascript Date ticks