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
40
How to set XamScheduleDataManager - LocalTimeZone by code?
posted

Goodmornig,

currently i open the time zone dialog with this code line:

XamScheduleDataManager1.PromptForLocalTimeZone = PromptForLocalTimeZone.Always;

Then i always select UTC. Is there any way to select the local time Zone by code - i don´t need a window?

I looking forward to your help.

Many thanks

Jan

Parents
No Data
Reply
  • 6365
    Verified Answer
    Offline posted

    Hello Jan,

    Thank you for the code-snippet you have provided.

    In order to set the LocalTimeZone programmatically, you can set the TimeZoneInfoProviderResolved.LocalTimeZoneId property of the ListScheduleDataConnector instance to TimeZoneInfo.Utc.Id.

    For example:

    DataConnector.TimeZoneInfoProviderResolved.LocalTimeZoneId = TimeZoneInfo.Utc.Id;

    For more detailed information on the TimeZone support for the XamSchedule, you can take a look at the following topic.

    If you have any questions, please let me know.

Children