Thanks a lot.

That means i need to write a parser.

Thanks


----- Original Message ----
From: Philipp Kewisch <[EMAIL PROTECTED]>
To: Google Calendar Data API <[email protected]>
Sent: Tuesday, August 21, 2007 12:04:05 PM
Subject: Re: How to parse Recurrence Rule ?


Take a look at rfc 2445, specifically section 4.6.5:

  The mandatory "TZOFFSETFROM" property gives the UTC offset which is
   in use when the onset of this time zone observance begins.
   "TZOFFSETFROM" is combined with "DTSTART" to define the effective
   onset for the time zone sub-component definition. For example, the
   following represents the time at which the observance of Standard
   Time took effect in Fall 1967 for New York City:

     DTSTART:19671029T020000

     TZOFFSETFROM:-0400

   The mandatory "TZOFFSETTO " property gives the UTC offset for the
   time zone sub-component (Standard Time or Daylight Saving Time)
when
   this observance is in use.

Also, I'd take a look at libical, since not every timezone definition
uses COUNT,INTERVAL but some also use BYSETPOS or such. You will need
a complete recurrence parser.

For this specific case, looking at the VTIMEZONE definition, it looks
like Calcutta has no daylight savings time (correct me if I'm wrong).
Now you only need to know the same information for PST, then you can
calculate the offset.
Philipp

On Aug 21, 7:12 am, Kulvinder Singh <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am fetching data from my Google calendar with many of the events a 
> Recurring. My current Google Calendar is in IST (i keep this changing when i 
> move across countries) but my machine is in PST and one of my Recurring 
> events are of the form :
>
> <gd:recurrence>DTSTART;TZID=Asia/Calcutta:20070807T080000 
> DTEND;TZID=Asia/Calcutta:20070807T093000 RRULE:FREQ=DAILY;COUNT=20;INTERVAL=1 
> BEGIN:VTIMEZONE TZID:Asia/Calcutta X-LIC-LOCATION:Asia/Calcutta 
> BEGIN:STANDARD TZOFFSETFROM:+0530 TZOFFSETTO:+0530 TZNAME:IST 
> DTSTART:19700101T000000 END:STANDARD END:VTIMEZONE</gd:recurrence>
>
> Now, the question is how do i parse the above string to convert this into a 
> Recurring event on my machine ? I actually want to know that the above 
> information suggests that TZID for my event is Asia/Calcutta and time (local) 
> in google calendar is 8:00 AM. How do i know which time it is in PST ?
>
> I want to get the UTCoffset in which my event was created so that i can 
> easily convert to its equivalent time on my machine. Do i have to read whole 
> of the information in this Recurrence string ? Is there any simpler way of 
> doing that ?
>
> Thanks
>
> ____________________________________________________________________________________
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
> today's economy) at Yahoo! 
> Games.http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow




       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to