i am trying to put datetimes in with exposed.. .. ...
# exposed
n
i am trying to put datetimes in with exposed.. .. my local timezone is
Europe/Berlin
so i tried converting them like so
Copy code
ISODateTimeFormat.dateTimeParser().parseDateTime(dateString).withZone(DateTimeZone.UTC)
and logging shows me the field should be
2020-03-18T16:17:00.000Z
but when i look into the database i see
2020-03-18 17:17:00
this looks almost as if exposed converts to the local timezone and then discards the timezone info (or
DATETIME
has no timezone info?) how can i make sure i save stuff as
UTC
always ?
s
Set the TimeZone default to UTC first thing in your main method