The use of quote_dt_param removes the need to append 'T000000Z'

All tests still pass.
This commit is contained in:
Andrew Ruthven 2024-01-20 16:45:17 +13:00
parent 435133adf5
commit 88fee9f155

View File

@ -1495,9 +1495,6 @@ function write_resource( DAVResource $resource, $caldav_data, DAVResource $colle
$calitem_params[':dtstart_orig'] = quote_dt_param($dtstart);
if ( empty($dtstart) ) $dtstart = $due;
if (isset($dtstart) && preg_match("/^1[0-8][0-9][0-9][01][0-9][0-3][0-9]$/", $dtstart)) {
$dtstart = $dtstart . "T000000Z";
}
$calitem_params[':dtstart'] = quote_dt_param($dtstart);
$dtend = $first->GetPValue('DTEND');
@ -1505,9 +1502,6 @@ function write_resource( DAVResource $resource, $caldav_data, DAVResource $colle
if ( isset($dtend) && $dtend != '' ) {
dbg_error_log( 'PUT', ' DTEND: "%s", DTSTART: "%s", DURATION: "%s"', $dtend, $dtstart, $first->GetPValue('DURATION') );
if (preg_match("/^1[0-8][0-9][0-9][01][0-9][0-3][0-9]$/", $dtend)) {
$dtend = $dtend . "T000000Z";
}
$calitem_params[':dtend'] = quote_dt_param($dtend);
$dtend = ':dtend';
}