This is a migrated thread and some comments may be shown as answers.

Export ICal Time Zone Issue

4 Answers 183 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 10 Aug 2009, 08:09 PM
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?

4 Answers, 1 is accepted

Sort by
0
Bob Schrum
Top achievements
Rank 1
answered on 22 Dec 2009, 06:36 PM
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
0
T. Tsonev
Telerik team
answered on 28 Dec 2009, 01:11 PM
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.
0
Shahzada
Top achievements
Rank 1
answered on 08 Jun 2012, 07:41 AM
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 
0
Plamen
Telerik team
answered on 11 Jun 2012, 08:46 AM
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.
Tags
Scheduler
Asked by
Nick
Top achievements
Rank 1
Answers by
Bob Schrum
Top achievements
Rank 1
T. Tsonev
Telerik team
Shahzada
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or