Browse Source
fix(dav): Convert dates without tz drift
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pull/41703/head
Christoph Wurst
2 years ago
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
3 changed files with
6 additions and
6 deletions
-
apps/dav/src/utils/date.js
-
dist/dav-settings-personal-availability.js
-
dist/dav-settings-personal-availability.js.map
|
|
|
@ -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}` |
|
|
|
} |