mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-22 02:04:19 +00:00
Switch to use new function for date presentation.
This commit is contained in:
parent
4410d8b0e7
commit
e576d884a3
@ -1,19 +1,18 @@
|
||||
<?php
|
||||
|
||||
require_once("iCalendar.php");
|
||||
|
||||
header("Content-type: text/plain");
|
||||
|
||||
$sql = "SELECT caldav_data.caldav_type AS type, calendar_item.uid, calendar_item.rrule ";
|
||||
$sql .= ", to_char(dtstart at time zone 'UTC',".iCalendar::SqlUTCFormat().") AS dtstart ";
|
||||
$sql .= ", to_char(dtend at time zone 'UTC',".iCalendar::SqlUTCFormat().") AS dtend ";
|
||||
$sql .= ", to_char(due at time zone 'UTC',".iCalendar::SqlUTCFormat().") AS due ";
|
||||
$sql .= ", to_char(dtstamp,".iCalendar::SqlUTCFormat().") AS dtstamp ";
|
||||
$sql .= ", to_char(last_modified,".iCalendar::SqlUTCFormat().") AS \"last-modified\" ";
|
||||
$sql .= " FROM caldav_data INNER JOIN calendar_item USING(user_no, dav_name)";
|
||||
$sql .= " WHERE caldav_data.dav_name ~ ".qpg("^".$request_path)." ";
|
||||
$sql = 'SELECT caldav_data.caldav_type AS type, calendar_item.uid, calendar_item.rrule ';
|
||||
$sql .= ', to_ical_utc(dtstart) AS dtstart ';
|
||||
$sql .= ', to_ical_utc(dtend) AS dtend ';
|
||||
$sql .= ', to_ical_utc(due) AS due ';
|
||||
$sql .= ', to_ical_utc(dtstamp) AS dtstamp ';
|
||||
$sql .= ', to_ical_utc(last_modified) AS "last-modified" ';
|
||||
$sql .= ' FROM caldav_data INNER JOIN calendar_item USING(user_no, dav_name) ';
|
||||
$sql .= ' WHERE caldav_data.dav_name ~ '.qpg("^".$request_path);
|
||||
$qry = new PgQuery( $sql );
|
||||
|
||||
header("Content-type: text/calendar");
|
||||
|
||||
echo iCalendar::iCalHeader();
|
||||
|
||||
$freebusy_properties = array( "uid", "dtstamp", "dtstart", "duration", "last-modified", "rrule" );
|
||||
@ -25,4 +24,5 @@ require_once("iCalendar.php");
|
||||
}
|
||||
}
|
||||
echo iCalendar::iCalFooter();
|
||||
|
||||
?>
|
||||
Loading…
x
Reference in New Issue
Block a user