mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-27 00:33:34 +00:00
Remove some bugs in timezone handling on WebDAV presentation of folders.
This commit is contained in:
parent
4f444d8bfa
commit
6346ae5966
@ -52,10 +52,7 @@ else if ( $qry->rows > 1 ) {
|
||||
$timezones = array();
|
||||
while( $event = $qry->Fetch() ) {
|
||||
$ical = new iCalendar( array( "icalendar" => $event->caldav_data ) );
|
||||
if ( isset($ical->tz_locn) && $ical->tz_locn != "" && isset($ical->vtimezone) && $ical->vtimezone != "" ) {
|
||||
$timezones[$ical->Get("TZID")] = $ical->vtimezone;
|
||||
}
|
||||
|
||||
$timezones[$ical->Get("TZID")] = 1;
|
||||
|
||||
if ( !is_numeric(strpos($event->permissions,'A')) && $session->user_no != $event->user_no ){
|
||||
// the user is not admin / owner of this calendarlooking at his calendar and can not admin the other cal
|
||||
@ -88,8 +85,18 @@ else if ( $qry->rows > 1 ) {
|
||||
$response .= $ical->Render( false, $event->caldav_type );
|
||||
}
|
||||
}
|
||||
foreach( $timezones AS $tzid => $vtimezone ) {
|
||||
$response .= $vtimezone;
|
||||
$tzid_in = "";
|
||||
foreach( $timezones AS $tzid => $v ) {
|
||||
$tzid_in .= ($tzid_in == '' ? '' : ', ');
|
||||
$tzid_in .= qpg($tzid);
|
||||
}
|
||||
if ( $tzid_in != "" ) {
|
||||
$qry = new PgQuery("SELECT tz_spec FROM time_zone WHERE tz_id IN ($tzid_in) ORDER BY tz_id;");
|
||||
if ( $qry->Exec("GET") ) {
|
||||
while( $tz = $qry->Fetch() ) {
|
||||
$response .= $tz->tz_spec;
|
||||
}
|
||||
}
|
||||
}
|
||||
$response .= iCalendar::iCalFooter();
|
||||
header( "Content-Length: ".strlen($response) );
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
HTTP/1.1 200 OK
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access
|
||||
Content-Length: 7506
|
||||
Content-Length: 9074
|
||||
Content-Type: text/calendar
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
@ -228,27 +228,93 @@ RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Pacific/Auckland
|
||||
TZID:/mozilla.org/20050126_1/Pacific/Auckland
|
||||
X-LIC-LOCATION:Pacific/Auckland
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+1300
|
||||
TZOFFSETTO:+1200
|
||||
DTSTART:19900318T030000
|
||||
RRULE:FREQ=YEARLY;UNTIL=20070317T140000Z;BYMONTH=3;BYDAY=3SU
|
||||
TZNAME:NZST
|
||||
DTSTART:19700315T030000
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3SU;BYMONTH=3
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:+1200
|
||||
TZOFFSETTO:+1300
|
||||
DTSTART:20070930T020000
|
||||
RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU
|
||||
TZNAME:NZDT
|
||||
DTSTART:19701004T020000
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:/mozilla.org/20070129_1/Antarctica/McMurdo
|
||||
X-LIC-LOCATION:Antarctica/McMurdo
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+1300
|
||||
TZOFFSETTO:+1200
|
||||
DTSTART:20080406T030000
|
||||
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
|
||||
TZNAME:NZST
|
||||
DTSTART:19700315T030000
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3SU;BYMONTH=3
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:+1200
|
||||
TZOFFSETTO:+1300
|
||||
TZNAME:NZDT
|
||||
DTSTART:19701004T020000
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTIMEZONE
|
||||
LAST-MODIFIED:20040110T032845Z
|
||||
TZID:New Zealand Standard Time
|
||||
X-LIC-LOCATION:Pacific/Auckland
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:20000404T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
|
||||
TZNAME:NZDT
|
||||
TZOFFSETFROM:+1200
|
||||
TZOFFSETTO:+1300
|
||||
END:DAYLIGHT
|
||||
BEGIN:STANDARD
|
||||
DTSTART:20001026T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=10
|
||||
TZNAME:NZST
|
||||
TZOFFSETFROM:+1300
|
||||
TZOFFSETTO:+1200
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Pacific/Auckland
|
||||
BEGIN:STANDARD
|
||||
DTSTART:20000319T030000
|
||||
RRULE:FREQ=YEARLY;BYDAY=3SU;BYMONTH=3
|
||||
TZNAME:Pacific/Auckland
|
||||
TZOFFSETFROM:+1300
|
||||
TZOFFSETTO:+1200
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:20001001T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=10
|
||||
TZNAME:Pacific/Auckland
|
||||
TZOFFSETFROM:+1200
|
||||
TZOFFSETTO:+1300
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:/softwarestudio.org/Olson_20011030_5/Pacific/Auckland
|
||||
X-LIC-LOCATION:Pacific/Auckland
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+1300
|
||||
TZOFFSETTO:+1200
|
||||
TZNAME:NZST
|
||||
DTSTART:19700315T030000
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3SU;BYMONTH=3
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:+1200
|
||||
TZOFFSETTO:+1300
|
||||
TZNAME:NZDT
|
||||
DTSTART:19701004T020000
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
END:VCALENDAR
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
HTTP/1.1 200 OK
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access
|
||||
Content-Length: 23650
|
||||
Content-Length: 24458
|
||||
Content-Type: text/calendar
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
@ -613,4 +613,39 @@ ACTION:DISPLAY
|
||||
TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
|
||||
END:VALARM
|
||||
END:VEVENT
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Pacific/Auckland
|
||||
BEGIN:STANDARD
|
||||
DTSTART:20000319T030000
|
||||
RRULE:FREQ=YEARLY;BYDAY=3SU;BYMONTH=3
|
||||
TZNAME:Pacific/Auckland
|
||||
TZOFFSETFROM:+1300
|
||||
TZOFFSETTO:+1200
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:20001001T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=10
|
||||
TZNAME:Pacific/Auckland
|
||||
TZOFFSETFROM:+1200
|
||||
TZOFFSETTO:+1300
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:/softwarestudio.org/Olson_20011030_5/Pacific/Auckland
|
||||
X-LIC-LOCATION:Pacific/Auckland
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+1300
|
||||
TZOFFSETTO:+1200
|
||||
TZNAME:NZST
|
||||
DTSTART:19700315T030000
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3SU;BYMONTH=3
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:+1200
|
||||
TZOFFSETTO:+1300
|
||||
TZNAME:NZDT
|
||||
DTSTART:19701004T020000
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
END:VCALENDAR
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user