I'm using the jQuery FullCalendar control and populating a hidden field with the calendar events in a JSON string.
To accomplish this I have to convert the date/times.
The example function I found below passes them in a usable format.
However, it's adjusting the events based on the client time zone.
How do I modify the function below to convert a SQL datetime without adjusting for the client time zone?
I tried removing ToUniversalTime() as suggested on another post, but it throws the time WAY off.
private long ConvertToTimestamp(DateTime value)
{
long epoch = (value.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
return epoch;
}