Addresses #5731 - offset the UTC offset in ISO strings to allow date only columns in external DBs to save the correct date when in a timezone differing from UTC.
This commit is contained in:
parent
a81744cf2a
commit
049bb5bd9c
|
@ -58,6 +58,11 @@
|
||||||
if (timeOnly) {
|
if (timeOnly) {
|
||||||
newValue = `2000-01-01T${newValue.split("T")[1]}`
|
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)
|
dispatch("change", newValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue