Merge pull request #41873 from nextcloud/backport/41703/stable28

[stable28] fix(dav): Convert dates without tz drift
This commit is contained in:
Arthur Schiwon 2023-11-29 21:52:58 +01:00 committed by GitHub
commit c967da3b56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View file

@ -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', [

View file

@ -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