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

DisplayToUtc

1 Answer 53 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Roatin Marth
Top achievements
Rank 1
Roatin Marth asked on 25 Aug 2011, 07:07 PM
I've recently been updating some of my out dated scheduler code to use the newer UI dll's as well as newer custom advanced from templates.

I've noticed the use of this DisplayToUtc method in some area. 

I was hoping someone could expand on the little documentation on this method and perhaps comment on where and how it should be used.

I just did a test in the save click method of the advanced form. I chose Aug 25th at 9am as the start date. 

>>> apt.get_start()
Date {Thu Aug 25 2011 09:00:00 GMT-0400 (Eastern Daylight Time)}
 
>>> this._scheduler.displayToUtc(apt.get_start())
Date {Thu Aug 25 2011 09:00:00 GMT-0400 (Eastern Daylight Time)}

So no change in that example.
I'm wondering in what cases should I xpect there to be a change and how this method was intended to be used

regards,
roatin

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivana
Telerik team
answered on 30 Aug 2011, 01:15 PM
Hello Roatin,

The displayToUtc(DateTime arg) method should convert the DateTime arg in a UTC±0 DateTime object.

I tested your example and displayToUtc will convert the apt.get_start() DateTime object only if the
TimeZoneOffset property of the RadScheduler is set.
Ex:
If the apt.get_start() returns "Thu Aug 25 2011 09:00:00", then having set the property TimeZoneOffset="03:00:00", the call of displayToUtc(apt.get_start()) will return
"Thu Aug 25 2011 06:00:00".

Greetings,
Ivana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Scheduler
Asked by
Roatin Marth
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Share this question
or