Understanding recurrence, timezones, and data storage

3 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    14 posts
    Member since:
    Feb 2011

    Posted 24 Oct 2011 Link to this post

    I'm trying to understand how the RadScheduler interacts with the database, as I'd like to use one for handling both recurring and non-recurring schedules, but I need to tie it into a clock-in system that can identify whether a user has clocked in for a particular occurence of an appointment (including individual recurrence of an recurring appointment). It also may involve users in different timezones.

    So here are some questions:

    1) User A is in California (PST), User B is in Alabama (CST), and the server is in EST timezone. User A creates an appointment for 3-5pm their time (PST). User B creates an appointment for 3-5pm their time (CST). What time is actually stored in the database in the start and end fields by the RadScheduler for each of these users? Does it store it in UTC time? As the server time? In their local time? How does it know they're on different timezones so that the EST user sees his own appointment as 3pm-5pm but sees the California appointment as 6pm-8pm if both appointments show on one calendar?

    2) When a user clocks in for a recurring appointment, every Monday 5pm to 8pm for instance, is there any unique ID between occurences of a recurring appointment that I can use to tie an October 24th clock-in to a different ID than an October 31st clock-in? Is there a simple way to take advantage of recurring appointments while still being able to know whether someone has clocked in for a particular instance of the recurring appointment?

    3) If I need to access appointments created through the RadScheduler from code that is not part of RadScheduler, such as in my check-in code, are there any Rad data classes/structures I can reference that allow me to easily query whether a particular date and time falls within any of my scheduled appointments (including their recurrences)? I'm concerned about whether I can easily retrieve the data created by RadScheduler in code elsewhere for other purposes.
  2. Jonathan
    Jonathan avatar
    14 posts
    Member since:
    Feb 2011

    Posted 25 Oct 2011 Link to this post

    Answering a couple of my own questions (but still welcome more info):

    1) Dates are stored in UTC time. Google found that info for me here: http://www.telerik.com/help/aspnet-ajax/scheduler-working-with-time-values.html

    2) There's no recurring tems created in the database, just a recurrence rule that appears to be an offshoot of the iCalendar formats. Any suggestions on ways to handle the need to tie a clock-in to a specific occurence of a recurring appointment?

    3) The Appointment class apparently includes a RecurrenceRule object which has an Occurences property that iterates through occurences. Is there a way to access a collection of Appointment class objects on pages that don't have a RadScheduler control so that I could do things like searching for matching appointments in my check-in code? Is there an alternate way of dealing with that sort of issue? Google brought me http://www.telerik.com/help/aspnet-ajax/scheduler-working-with-recurring-appointments.html but it doesn't seem to cover a non-RadScheduler page.
  3. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 28 Oct 2011 Link to this post

    Hi Jonathan,

    Rgarding 2. & 3., you don't actually need a RadScheduler instance to parse the recurrence rule and extract all occurrences of a recurring appointment. For example, the kb article on How to display all RadScheduler appointments in GridView, indeed uses a RadScheduler, but you can try the same approach simply by looping through an array of recurrence rule strings.

    Alternatively, you can expand the recurrence rule on the SQL server using UDF as explained in this blog post - http://blogs.telerik.com/aspnet-ajax/posts/08-08-04/working-with-radscheduler-recurring-appointments-on-sql-server.aspx.


    Regards, Peter
    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