Hi
I'm using Q2 2011 SP1 (v2011.2.11.0831) and have discovered differences in Appointment.Start + End DateTime values between Dayview Viewtypes and Monthview,Timelineview.
//all views are initialized with
if (utcPlusOneTimeZone == null)
{
//utcPlustOneTimeZoneInfo = new SystemTime.TimeZoneInformation();
//utcPlustOneTimeZoneInfo = TimeZoneInfo.Local;
//utcPlustOneTimeZoneInfo.bias = -60;
//utcPlustOneTimeZoneInfo.daylightBias = -60;
//utcPlusOneTimeZone = new SchedulerTimeZone(utcPlustOneTimeZoneInfo, "CH");
utcPlusOneTimeZone = new SchedulerTimeZone(TimeZone.CurrentTimeZone);
}
switch (vt)
{
case SchedulerViewType.Day:
if (_dayView == null)
{
_dayView = radScheduler1.GetDayView();
_dayView.DefaultTimeZone = utcPlusOneTimeZone;
}
break;
case SchedulerViewType.Month:
if (_monthView == null)
{
_monthView = radScheduler1.GetMonthView();
_monthView.DefaultTimeZone = utcPlusOneTimeZone;
}
break;
case SchedulerViewType.Timeline:
if (_timelineView == null)
{
_timelineView = radScheduler1.GetTimelineView();
_timelineView.DefaultTimeZone = utcPlusOneTimeZone;
}
break;
//save function calls webservice
DateTime start = app.Start.ToLocalTime();
DateTime end = app.End.ToLocalTime();
if (systemService.ChangePlanningElement(app.ElementGID.ToString(), start,end)) return true;
- Month + Timelineview : app.Start.Kind = Unspecified and ToLocalTime() adds 2hours (utc+1 + Summertime)
- other dayview type : app.Start.Kind = Local and and ToLocalTime() = 0
//Workaround before calling webservice
TimeSpan tsOffset = app.Start.ToLocalTime() - app.Start;
DateTime start = app.Start.ToLocalTime() - tsOffset; //subtracts 0 or Timezonedifference
Why ist MonthCellElement.Date of Type Unspecified with TimezoneOffset=2h and SchedulerCellElement.Date of type Local with TimezoneOffset=0h
Thanks for clearing, Daniel