Por ejemplo en el calendario selecciono de 9:00 am a 9:15am y en el php me imprime:
Código PHP:
Ver original
2014-05-27T08:00:00-05:00 - 2014-05-27T08:00:00-05:00
Una hora de retraso!!
no se que mas hacer, y ps las fechas no es lo mio.. les dejo el codigo a ver si me pueden ayudar gracias
jquery y html:
Código HTML:
Ver original
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <style type='text/css'> body { font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif; margin: 0; } h1 { margin: 0; padding: 0.5em; } p.description { font-size: 0.8em; padding: 1em; position: absolute; top: 3.2em; margin-right: 400px; } #message { font-size: 0.7em; position: absolute; top: 1em; right: 1em; width: 350px; display: none; padding: 1em; background: #ffc; border: 1px solid #dda; } </style> <link rel='stylesheet' type='text/css' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/smoothness/jquery-ui.css' /> <link rel='stylesheet' type='text/css' href='jquery.weekcalendar.css' /> <script type='text/javascript'> var year = new Date().getFullYear(); var month = new Date().getMonth(); var day = new Date().getDate(); $(document).ready(function() { $('#calendar').weekCalendar({ timeslotsPerHour: 4, height: function($calendar){ return $(window).height() - $("h1").outerHeight(); }, eventRender : function(calEvent, $event) { if(calEvent.end.getTime() < new Date().getTime()) { $event.css("background-color", "#F00"); $event.find(".time").css({"backgroundColor": "#999", "border":"1px solid #888"}); } }, eventNew : function(calEvent, $event) { /**/ //post to events.php location.href="evento.php?action=save&start="+calEvent.start.getTime()/1000+"&end="+calEvent.end.getTime()/1000; //guardarCita(calEvent.start.getTime()/1000,calEvent.end.getTime()/1000); }, eventDrop : function(calEvent, $event) { }, eventResize : function(calEvent, $event) { }, eventClick : function(calEvent, $event) { var confirmacion = confirm('desea eliminar esta cita'); if(confirmacion == true) { eliminacion(calEvent.start); alert('eliminado'); } else } }, eventMouseover : function(calEvent, $event) { }, eventMouseout : function(calEvent, $event) { }, noEvents : function() { displayMessage("There are no events for this week"); }, data:"events.json" }); function displayMessage(message) { $("#message").html(message).fadeIn(); } }); </script> </head> <body> </body> </html>
y en evento.php:
Código PHP:
Ver original
El echo imprime con una hora de retraso
lo que envio por el get es:
evento.php?action=save&start=1401199200&end=140120 0100
Gracias