I have an Oracle 11g XE set up in Moscow, Russia, and therefore on MSK time zone. When a client in the same timezone stores a DATE variable from Java with, say time set to 12:00, the time is changed to 08:00 when I read it back. The Oracle data type is DATE (no TZ) and there is no timezone handling in my Java client.
The output of the following queries to check timezone settings in Oracle are:
select dbtimezone, sessiontimezone from dual; DBTIMEZONE = +00:00 SESSIONTIMEZONE = Europe/Moscow (which I guess is +03:00)
So the sessiontimezone is probably the culprit, but why does it affect non _TZ columns and what is the best way to solve it?