Good morning. I'm working with FullCalendar. When I create an event, it returns a string "ISO8601 date string", I would like to translate it to PHP (date ("Y-m-d H: i: s"))
I know that to convert to an ISO8601 cademna is date ("c", strotime ($ date)), but let's say that what I want to do is the other way round.
The problem is when I do the following:
$cadenaenISO8601 = "1508112000000";
$date = date("Y-m-d H:i:s", strotime($cadena);
or
$date = date("Y-m-d H:i:s", intval($cadena);
It returns me wrong values.
Edit: $ task if it returns, anyway it has nothing to do and should not have done, since it only generates confusion. The issue is that when I click on a day to create an event, it returns start and end, with the string I put below
$('#calendar').fullCalendar({
// put your options and callbacks here
locale: '<?php echo $locale ?>',
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultView: 'month',
navLinks: true, // can click day/week names to navigate views
selectable: true,
selectHelper: true,
select: function(start, end) {
window.location="{{ url('task_create') }}"+"/"+start+"/"+end;
},
editable: true,
height:650,
events : [
]
})
});
With this string:
Start: string(13) "1508198400000"
End: string(13) "1508284800000"