Hi kelt,
As you have noted there isn't a property in AtomFeed in the .NET
client library to parse timezone information for you, however there is
a way to still get at the information. Every entry in the calendar
feed will have an extension element called "gCal:timezone". For
example, if the entry of the calendar you want the timezone of is
called "calendarEntry" the following code would print the timezone
information to the command prompt:
foreach (Object extElement in calendarEntry.ExtensionElements)
{
if (extElement.GetType() == typeof(XmlElement))
{
XmlElement xe = (XmlElement) extElement;
if (xe.Name == "gCal:timezone")
{
Console.WriteLine("value = " +
xe.Attributes["value"].InnerText);
}
}
}
Happy coding,
-Jeff
On Aug 5, 10:37 am, kelt <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I am trying to figure out how to retrieve timezone from AtomFeed,
> which holds all calendars of the user. When I save calendar to XML I
> can see there gCal:Timezone node, but it cannot be accessed.
>
> The only way I can get to timezone is through EventFeed, which has
> such property, when I download events for every calendar.
>
> But I need to get the timezone value in the first step. Does anyone
> know how to achieve this?
>
> Thank you
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---