Export ICal Time Zone Issue

5 posts, 0 answers
  1. Nick
    Nick avatar
    11 posts
    Member since:
    Jan 2009

    Posted 10 Aug 2009 Link to this post

    I've just implemented a timezone drop down for my scheduler like your online demo shows. That works fine. When I select the timezone from the drop down, I'm able to create appointments according to the timezone selected.

    The problem I'm running into is exporting the appointment to ICal. I've used the code from the online example 'How to preserve the time of the appointment when exporting to iCalendar' It works fine locally on my development machine. The file exports to outlook with the same time/date shown on the scheduler. However, when I run the page from our web server, which is in the Central Time Zone, when I export the appointment from my machine in the eastern time zone, the times on the export file are an hour ahead of the appointment time shown on the scheduler.

    Any ideas on what could be causing this issue?
  2. Bob Schrum
    Bob Schrum avatar
    3 posts
    Member since:
    Oct 2009

    Posted 22 Dec 2009 Link to this post

    We believe we are experiencing the same issue with a 2008 release of AJAX RadScheduler.  The what's new page for the WPF version of RadScheduler indicates there's a change in the ICal export to fix a bug where export to Outlook is inaccurate when the export is done during Daylight Savings Time (the most obvious interpretation of the parenthetical phrase in the blurb:

    "Fixed bug in ICal export related to TimeZone. When the appointments' dates  were exported to calendar, which then was imported into Outlook (in Daylight Saving Time), a difference between the dates' time appeared"

    This is a question for Telerik folks: does the AJAX version share the same ICal codebase, and should we expect this to have been corrected in the 2009 Q1 or later AJAX releases as well?  There is no mention of that in the AJAX change documentation. 

    Thanks

    -Bob
  3. T. Tsonev
    Admin
    T. Tsonev avatar
    2831 posts

    Posted 28 Dec 2009 Link to this post

    Hi Bob,

    The Silverlight/WPF Scheduler controls include information about the time zone of the appointment. This is possible because they have access to the .NET 3.5-specific TimeZoneInfo class and they run on the client.

    The same can't be easily applied to a server-side ASP.NET 2.0 control that also needs to support .NET 2.0. As a result the controls don't share export code and currently the ASP.NET Scheduler does not include time zone information in the exported file.

    This can be remedied to some extent by exporting the appointments in UTC time and applying the needed correction as described in the KB article that Nick mentions. In case your server is running in a different time zone, we can use the .NET 3.5 TimeZoneInfo class to obtain information for the desired zone:

    TimeSpan aptStartOffset = TimeZone.CurrentTimeZone.GetUtcOffset(aptStart) - RadScheduler1.TimeZoneOffset;
      
    // Becomes:
      
    TimeZoneInfo tz = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");
    TimeSpan aptStartOffset = tz.GetUtcOffset(aptStart) - RadScheduler1.TimeZoneOffset;

    This isn't a perfect solution and we're planning to provide better time-zone support for RadScheduler. This will include time zone definition that will replace the current TimeZoneOffset property and will be used to properly format the exported file.

    This is a significant change and such support will not be ready for Q1. We apologise for any inconvenience caused.

    Regards,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  4. Shahzada
    Shahzada avatar
    22 posts
    Member since:
    Jan 2012

    Posted 08 Jun 2012 Link to this post

    export to icalendar has wrong appointment time

    Appointment is for (12:30 PM to 2:00 PM)
    but after export it shows in outlook calender for (5:30 PM to 7:00 PM)

    is there any setting or attributes to add 5+ GMT or some thing extra 

    plz help 
  5. Plamen
    Admin
    Plamen avatar
    3047 posts

    Posted 11 Jun 2012 Link to this post

    Hello Shahzada,

     
    You can set the RadScheduler's property TimeZoneOffset="05:00:00" as it is shown in the on-line demo.

    Hope this will be helpful.

    All the best,
    Plamen Zdravkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top