Merge pull request #41703 from nextcloud/fix/dav/ooo-date-conversion

fix(dav): Convert dates without tz drift
pull/41816/head
Christoph Wurst 6 months ago committed by GitHub
commit e589232815
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -177,7 +177,7 @@ class OutOfOfficeListener implements IEventListener {
->setTime(0, 0);
$end = (new DateTimeImmutable())
->setTimestamp($data->getEndDate())
->modify('+ 2 days')
->modify('+ 1 days')
->setTime(0, 0);
$vCalendar = new VCalendar();
$vCalendar->add('VEVENT', [

@ -27,8 +27,8 @@
* @return {string} 'YYYY-MM-DD'
*/
export function formatDateAsYMD(date) {
const year = date.getUTCFullYear()
const month = (date.getUTCMonth() + 1).toString().padStart(2, '0')
const day = date.getUTCDate().toString().padStart(2, '0')
const year = date.getFullYear()
const month = (date.getMonth() + 1).toString().padStart(2, '0')
const day = date.getDate().toString().padStart(2, '0')
return `${year}-${month}-${day}`
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save