Código PHP:
$user = '************';
$pass = '**********';
$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service name for calendar
$client = Zend_Gdata_ClientLogin::getHttpClient($user,$pass,$service);
$fecha = "2010-12-26";
$sitio = "Madrid";
$hora = "16:00";
$hora_fin = "17:00";
createEvent($client , $title = "Alquiler moto de nieve", $desc = "Alquiler", $where = $sitio, $startDate = $fecha, $startTime = $hora, $endDate = $fecha, $endTime = $hora_fin, $tzOffset = '+1');
Cita:
pero como es posible? Si yo he puesto el formato de la fecha tal cual me aparece en el tutorial oficial de google (http://code.google.com/intl/es-ES/ap...ttingStarted):Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 400 [Line 1, Column 296, element gd:when] Badly formatted datetime' in I:\xampp\htdocs\gcalendar\Zend\Gdata\App.php:709 Stack trace: #0 I:\xampp\htdocs\gcalendar\Zend\Gdata.php(219): Zend_Gdata_App->performHttpRequest('POST', 'http://www.goog...', Array, '<atom:entry xml...', 'application/ato...', 5) #1 I:\xampp\htdocs\gcalendar\Zend\Gdata\App.php(695): Zend_Gdata->performHttpRequest('POST', 'http://www.goog...', Array, '<atom:entry xml...', 'application/ato...', 5) #2 I:\xampp\htdocs\gcalendar\Zend\Gdata.php(219): Zend_Gdata_App->performHttpRequest('POST', 'http://www.goog...', Array, '<atom:entry xml...', 'application/ato...', NULL) #3 I:\xampp\htdocs\gcalendar\Zend\Gdata\App.php(900): Zend_Gdata->performHttpRequest('POST', 'http://www.goog...', Array, '<atom:entry xml...', 'application/ato...') #4 I:\xampp\htdocs\gcalendar\Zend\Gdata\App.php(975): Zend_Gdata_App->post(Object(Zend_Gdata_Calendar_EventEntry), 'htt in I:\xampp\htdocs\gcalendar\Zend\Gdata\App.php on line 709
Código PHP:
function createEvent ($client, $title = 'Tennis with Beth',
$desc='Meet for a quick lesson', $where = 'On the courts',
$startDate = '2008-01-20', $startTime = '10:00',
$endDate = '2008-01-20', $endTime = '11:00', $tzOffset = '-08')
Un saludo