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 8861441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:29:36+00:00 2026-06-14T15:29:36+00:00

How could I update date and time.. Everything is fine, except date and time.

  • 0

How could I update date and time.. Everything is fine, except date and time. After every update they are same and never changed. Where do you think is my mistake?

Here is the function that I use to update events.

    function updateEvent ($client, $eventId, $newTitle, 
        $newDesc, $newWhere, $newStartDate, 
        $newStartTime, $newEndDate, $newEndTime, 
        $tzOffset)
            {   
                $gdataCal = new Zend_Gdata_Calendar($client);
                if ($eventOld = getEvent($client, $eventId)) {
                $eventOld->title = $gdataCal->newTitle($newTitle);
                $eventOld->where = array($gdataCal->newWhere($newWhere));
                $eventOld->content = $gdataCal->newContent("$newDesc");

                $when = $gdataCal->newWhen();

                if ($newStartTime!='' && $newEndTime!=''){
                  $when->startTime = "{$newStartDate}T{$newStartTime}:00.000{$tzOffset}:00";
                  $when->endTime = "{$newEndDate}T{$newEndTime}:00.000{$tzOffset}:00";
                }else {
                  $when->startTime = $newStartDate;
                  $when->endTime = $newEndDate;
                }

                try {
                  $eventOld->save();
                } catch (Zend_Gdata_App_Exception $e) {
                  var_dump($e);
                  return null;
                }
                  return 1;
              } else {
                return 0;
              }
            }

            if($_POST) {

              updateEvent($client, $id, $_POST['nameBg'], $_POST['descrBg'], $_POST['place'],
               $_POST['dateStart'],
               $_POST['dateEnd'],
               $_POST['timeStart'],
               $_POST['timeEnd'],
               '+02');



        $this->_helper->FlashMessenger->addMessage(array('success' => $this->_translate->_('Everything is OK.')));

        return $this->_helper->redirector->gotoRoute(array_merge($this->_urlCommon, array('action' => 'list')), 'lang-admin', true);


            } 
  • 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-14T15:29:37+00:00Added an answer on June 14, 2026 at 3:29 pm

    I find where was my problem.. Actually when i call updateEvent() i have changed the places of timeStart and dateEnd..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently using Microsoft Sync Framework and everything is working fine except the SQL
how could I determine the last login date/time of a user on a MOSS
I want to update a cell with the date-time when a value is entered
UPDATE AT THE BOTTOM Maybe somebody could help with this... been struggling with it
Could someone tell me why this code does not update the data response? It's
I'm trying to find the best way to update an object which could be
We use VisualSVN server here at work and everything works fine, we have over
In this link, http://plone.org/documentation/how-to/set-default-datetimefield-current-date-time it describes how to do this with new Schema attributes.
I want to display the date time (which I've placed on master page); in
[Disclaimer]: Currently we are running older SQL Server 2000, but we could update to

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.