I am using the jQuery plugin to render the calendar ( http://arshaw.com/fullcalendar/ ). The problem is that the dates are one hour ahead. I tried to browse the files to find out where this is happening.
Could there be something with daily savings? I am pretty ignorant. The dates from the database are correct, but after they are converted to a UNIX timestamp, they skip one hour.
I use this to convert a date to a timestamp.
private double ConvertToTimestamp(DateTime value)
{
var date = new DateTime(1970, 1, 1, 0, 0, 0, 0);
TimeSpan span = (value - date.ToLocalTime());
return (double)span.TotalSeconds;
}
But I believe that this is not where the problems lie.
Thank.
source
share