Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
XamScheduleDataManager default to AllowTimeZoneNeutral to true when creating new activities.
posted

We are in GMT London timezone and our time is about to change this coming Sunday because of daylight savings. 

The problem we have is when selecting from a time slot its doing a time conversion on creation.

For example I have clicked into a time slot 11:00 to 12:00 

on the dm_ActivityDialogDisplaying event I look on the start date time and its already adjusted the time due to daylight savings

How can you override this so this does not happen and we just get the time slot clicked on.

The calendar is already using:

<ig:ScheduleSettings.AppointmentSettings>
                        <ig:AppointmentSettings AllowTimeZoneNeutral="True"/>
                       
                    </ig:ScheduleSettings.AppointmentSettings>

which works for existing appointments because I can mark it as
IsTimeZoneNeutral but I cant do this for newly created appointments. When I look at newly created appointments its marked
IsTimeZoneNeutral as false.

  • 34510
    Offline posted

    Hi Dev Manager,

    The Start and End properties for the Activity are in UTC so if you want to get the time that you see was clicked in the UI you'll have to get the local time.  The Activity has methods you can call for this called GetStartLocal() and GetEndLocal().

    http://help.infragistics.com/doc/WPF/2016.1/CLR4.0/?page=InfragisticsWPF4.Controls.Schedules.v16.1~Infragistics.Controls.Schedules.ActivityBase~Start.html

    You'll need to pass in the correct TimeZoneToken which can be obtained from the data connector's TimeZoneInfoProviderResolved property:

    var token = dataConnector.TimeZoneInfoProviderResolved.GetTimeZoneToken(TimeZone.CurrentTimeZone.StandardName);
    var localStart = e.Activity.GetStartLocal(token);

    Let me know if you have any questions on this.