I’m working with the Basic Scheduler in MVC3 and have enabled
server_utc:true
in my dhtmlxscheduler.js
The problem I am running into is that when I save an event that starts at 12:00AM, it saves it in the database as 06:00:00. The time should actually be 5AM, since I’m 5 hours behind UTC/GMT, not 6 hours. I’ve confirmed on my computer that I am indeed setup for Daylight Savings Time.
I have another piece of code I wrote to test out proper UTC that gives me the correct offset (5 hours):
return (new Date()).getTimezoneOffset().toString();
Why does the scheduler think I am 6 hours behind GMT when I’m really 5 hours behind GMT?
I would suspect something fishy going on here:
return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());
Thanks,
Mike