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

  • Home
  • SEARCH
  • 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 8906621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:42:13+00:00 2026-06-15T02:42:13+00:00

Currently I’m working on project where I need to access Google Calenadar data using

  • 0

Currently I’m working on project where I need to access Google Calenadar data using API – everything works fine but I’m unable to get event start time/end time – most important informations.

I’m using Zend framework and Zend_Gdata library , unfortunately zend’s documentation isn’t detailed

How to get needed event data? Or maybe should I use another library?

Here is my function for getting event feed:

public function getEvents($future_only = TRUE,$force_refresh = FALSE) {

    if (($this->events != NULL) && $force_refresh == FALSE) {
        return $this->events;
    } else {
        if ($this->getService() != NULL) {
            $service = $this->getService();
            try {

                $query = $service->newEventQuery($this->url);
                $query->setUser(null);
                $query->setProjection(null);
                $query->setVisibility(null);
                $query->setOrderby('starttime');
                if ($future_only) {
                    $query->setFutureevents('true');
                } else {
                    $query->setFutureevents('false');
                }

                $event_feed = $service->getCalendarEventFeed($query);

                $this->events = $event_feed;

                return $event_feed;
            } catch (Exception $exc) {
                .
                .
                .
                return NULL;
            }
        } else {
            return NULL;
               }
           }
        }

And sample test code where I’m trying to obtain event informations:

       $gcalendar = new  Common_Model_GoogleCalendar();

             $events = $gcalendar->getEvents();

            if($events){

            foreach ($events as $evt) {
                echo $evt->title.'<br />';
                echo $evt->id.'<br />';
                echo $evt->published.'<br />';
                Zend_Debug::dump($evt->getWhen());       //returns empty array

            }
            }
  • 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-06-15T02:42:15+00:00Added an answer on June 15, 2026 at 2:42 am

    Not sure if you have sorted this by now, but in addition to @Ashley’s contribution, this is how to get getWhen() to work:

    $when = $evt->getWhen();
    echo $when[0]->getStartTime();
    echo $when[0]->getEndTime();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, I'm working on a project where I have a server - client relationship
Currently I know of only two ways to cache data (I use PHP but
Currently I'm using the Jackson JSON Processor to write preference data and whatnot to
Currently I am working in message compose screen in Android, Using Intent to show
Currently I am using Microsoft Sync Framework to synchronize databases. I need to gather
Currently I am using HTML files for parts of my user interface. I display
currently, I`m implementing a map App with Mono4Droid and there I`m using a WebView
Currently working with converting SQLException error messages into messages that are more useful for
Currently I am using Amazon Cloudfront to service static objects on my ASP.Net MVC3
Currently we have a project with a standard subversion repository layout of: ./trunk ./branches

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.