Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3316904
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:31:28+00:00 2026-05-17T22:31:28+00:00

I have the following code for use in my asp.net website: CalendarService service =

  • 0

I have the following code for use in my asp.net website:

CalendarService service = new CalendarService("mycalendar");
EventQuery query = new EventQuery();
query.Uri = new Uri(group.GroupEventsURL);
query.SingleEvents = true;
query.SortOrder = CalendarSortOrder.ascending;
query.ExtraParameters = "orderby=starttime";
query.NumberToRetrieve = 50;
query.TimeZone = "America/Chicago";
EventFeed feed = service.Query(query);

Which produces the following URL:

http://www.google.com/calendar/feeds/TRIMMEDgroup.calendar.google.com/private-TRIMMED/full?max-results=50&orderby=starttime&ctz=America%2FChicago&sortorder=ascending&singleevents=true

According to the documentation (emphasis mine), I expect the Times in each EventEntry to be in the Central time zone:

ctz: The current timezone. If not specified, times are returned in the calendar time zone.

  • Times in the resulting feed will be represented in this timezone.
  • Replace all spaces with underscores (e.g. “ctz=America/Los_Angeles”).

But my server is hosted in Arizona, so (for now) all of the dates on the calendar are two hours earlier than they should be. Am I doing something wrong? How do I get the dates in the feed to be in the Central time zone even though the server is in Arizona?

I do not plan on moving my hosting any time soon, but since Arizona does not participate in Daylight Savings Time, I cannot simply add two hours to every date.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:31:29+00:00Added an answer on May 17, 2026 at 10:31 pm

    I am still open to other ideas, but here is what I got to work. I created my own CalendarService class, which converts the dates from:

    2010-10-13T18:30:00.000-05:00

    to:

    2010-10-13 18:30:00

    These dates are then converted to the same (and correct) DateTime in any time zone.

    internal class CalendarService2 : CalendarService
    {
        public CalendarService2(string applicationName) : base(applicationName) { }
    
        public new EventFeed Query(EventQuery feedQuery)
        {
            EventFeed feed = new EventFeed(feedQuery.Uri, this);
            using (Stream input = base.Query(feedQuery.Uri, DateTime.MinValue))
            {
                XmlDocument doc = new XmlDocument();
                doc.Load(input);
                XmlNodeList nodes = doc.SelectNodes("(//@startTime|//@endTime)[contains(.,'.000-')]");
                foreach (XmlNode node in nodes)
                {
                    node.Value = node.Value.Remove(node.Value.Length - 10).Replace('T', ' ');
                }
                using (MemoryStream output = new MemoryStream())
                {
                    doc.Save(output);
                    output.Position = 0;
                    feed.NewAtomEntry += new FeedParserEventHandler(this.OnParsedNewEntry);
                    feed.NewExtensionElement += new ExtensionElementEventHandler(this.OnNewExtensionElement);
                    feed.Parse(output, AlternativeFormat.Atom);
                }
            }
            return feed;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following snippet of code that's generating the Use new keyword if
I have the following ASP.NET code: <div id=panelIssue runat=server style=width: 450px; height: 320px;> <gsl:IssueUC
I'm trying to use opengl in C#. I have following code which fails with
I have several blocks of the following code that each use there own matrix.
I am trying to use the following code, which I have not been able
According to what I have found so far, I can use the following code:
I have the following use case , lot of code which was tightly coupled
I have an ASP.Net website which uses a MySQL database for the back end.
I have a process in a website (Asp.net 3.5 using Linq-to-Sql for data access)
i have the following situation, i have a Reporting layer(stand alone) in asp.net application(NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.