Timezone Issue in Month + Timeline view

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    19 posts
    Member since:
    Nov 2010

    Posted 11 Oct 2011 Link to this post

    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;
                    case SchedulerViewType.Month:
                        if (_monthView == null)
                            _monthView = radScheduler1.GetMonthView();
                            _monthView.DefaultTimeZone = utcPlusOneTimeZone;
                    case SchedulerViewType.Timeline:
                        if (_timelineView == null)
                            _timelineView = radScheduler1.GetTimelineView();
                            _timelineView.DefaultTimeZone = utcPlusOneTimeZone;
    //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

  2. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 13 Oct 2011 Link to this post

    Hello Daniel,

    Thank you for contacting us.

    Your question is about SchedulerCellEment's Date property, but your code demonstrates usage of the Appointments' Start property which gets me a bit confused. However, I am not able to find any discrepancies between the different views. The dates of the cells are generated according to the View's StartDate, so the problem might be related to some custom setting of this property. In general, the dates in the cell elements are with Date.Kind = Local because they do not depend on the current timezone and the dates of the appointment elements are with Date.Kind = Unspecified because they represent a date that might be different in different timezones.

    You can open a new support ticket and send me a sample project which reproduces the issue. This will let me investigate what causes it and provide you with more accurate answers.

    I hope this is useful. Feel free to contact us if you need further help.

    Best wishes,
    Ivan Todorov
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

  3. DevCraft R3 2016 release webinar banner
Back to Top