Hello.
I am using a JQuery plugin to render a calendar (http://arshaw.com/fullcalendar/). Problem is that the dates are one hour ahead. I have tried looking into the files to find out where this happens.
Can it be something with day light savings? I am pretty clueless. The dates from the database is correct, but once they are converted to a UNIX timestamp they are missing one hour.
I use this to convert my date to timestamp.
private double ConvertToTimestamp(DateTime value)
{
//create Timespan by subtracting the value provided from
//the Unix Epoch
var date = new DateTime(1970, 1, 1, 0, 0, 0, 0);
TimeSpan span = (value - date.ToLocalTime());
//return the total seconds (which is a UNIX timestamp)
return (double)span.TotalSeconds;
}
But i believe its not where the problems lies.
Thank you.