search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Client side date change UTC problem

Asked by Rafael
15 years ago.
Hi, I'm trying to change the DayPilot dates from the client side: JavaScript: DayPilotCal.ChangeDates(dateFirst,DaysSelect); C#: protected void DayPilotCalendar1_Refresh(object sender, RefreshEventArgs e) { DayPilotCalendar1.StartDate = e.StartDate; DayPilotCalendar1.Days = e.Days; DayPilotCalendar1.Update(data, CallBackUpdateType.Full); } I keep getting different dates in the server side: dateFirst = Sun Apr 19 12:00:00 UTC+0200 2009 e.StartDate = {19/04/2009 10:00:00} dateFirst = Sun Apr 5 00:00:00 UTC+0200 2009 e.StartDate = {04/04/2009 22:00:00} There is a 2 hours offset because of the UTC. How should I handle changing the DayPilot Dates from the JS? Thanks. Rafael
Comment posted by Dan Letecky
14 years ago.

All the dates passed from the client side are evaluated using theit GMT value. You can also use DayPilot.Date instance instead (DayPilot.Date is a pure DateTime value without time zone offset information).

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.