I have a date that I am storing as a timestamp through the formatDate function in jQuery. I am then retriving this value to make an ics file, a calender file that adds the event time and details to the users calender. However the timestamp format isn't working in the ics file, the correct date isn't being added, so I need to convert it to a value that looks like 20091109T101015Z
. It's current format as a timestamp looks like 1344466800000
This is from this example which is what I am following to create my ics file.
My link to the php file is http:// domain. com/icsCreator.php?startDate=1344380400000&endDate=1345503600000&event=Space%20Weather%20Workshop&location=London
Current my ics file looks like
<?php
$dtStart=$_GET['startDate'];
$dtEnd=$_GET['endDate'];
$eventName=$_GET['event'];
$location=$_GET['location'];
...
echo "CREATED:20091109T101015Z\n";
echo "DESCRIPTION:$eventName\n";
echo "DTEND:$dtEnd\n";
echo "DTSTART:".$dtStart."\n";
echo "LAST-MODIFIED:20091109T101015Z\n";
echo "LOCATION:$location\n";
...
?>