Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dav): Convert dates without tz drift #41703

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/dav/lib/Listener/OutOfOfficeListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private function createVCalendarEvent(IOutOfOfficeData $data, ?string $timeZoneD
->setTime(0, 0);
$end = (new DateTimeImmutable())
->setTimestamp($data->getEndDate())
->modify('+ 2 days')
->modify('+ 1 days')
->setTime(0, 0);
$vCalendar = new VCalendar();
$vCalendar->add('VEVENT', [
Expand Down
6 changes: 3 additions & 3 deletions apps/dav/src/utils/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
}
4 changes: 2 additions & 2 deletions dist/dav-settings-personal-availability.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dav-settings-personal-availability.js.map

Large diffs are not rendered by default.

Loading