1
0
Fork 0
mirror of synced 2024-08-09 07:08:01 +12:00

Merge pull request #5873 from Budibase/fix/5731

Fix for external DB date only columns in various timezones
This commit is contained in:
Michael Drury 2022-05-13 14:40:14 +01:00 committed by GitHub
commit e1aadb2799

View file

@ -58,6 +58,11 @@
if (timeOnly) {
newValue = `2000-01-01T${newValue.split("T")[1]}`
}
// date only, offset for timezone so always right date
else if (!enableTime) {
const offset = dates[0].getTimezoneOffset() * 60000
newValue = new Date(dates[0].getTime() - offset).toISOString()
}
dispatch("change", newValue)
}