-
Notifications
You must be signed in to change notification settings - Fork 763
Closed
Labels
Description
When using date as a table column (Column<LocalDate>) the value saved to the DB depends on the timezone of the system. This means something like
SomeTable.insert {
this[date] = LocalDate.parse("2020-01-01")
}will be non-deterministic. The same code will insert a different value depending on the machine where it's run.
My suggestion would be to make dates use UTC by default.
EDIT: it seems this happened because I had created the column via regular SQL as a timetamptz (Postgres) so there was a mismatch. Even though JavaLocalDateColumnType's SQL type is DATE it continued to work, albeit incorrectly, not sure if this should be a bug or not.
Reactions are currently unavailable