On 02/20/2014 04:29 AM, Dev Kumkar wrote:
> On Thu, Feb 20, 2014 at 3:53 AM, Adrian Klaver
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
>
> Each driver will have its own behavior. For an explanation of the
> JDBC behavior see here:
>
> http://www.postgresql.org/__message-id/4B2F2CED.10400@__opencloud.com
<http://www.postgresql.org/message-id/4B2F2CED.10400@opencloud.com>
>
>
> Per Andrews posts, the least surprise behavior is to explicitly set
> the client time zone. Then you control what is being seen/used.
>
>
> Actually then this goes back to the same thing that identify the
> timezone setting in OS and accordingly set at the driver level.
> In case of java JVM is picking up OS timezone and hence things are
> working without any issues for windows/linux both.
No it is the Postgres JDBC driver that is doing this. It seems the MySQL
JDBC driver operated differently until recently:
http://stackoverflow.com/questions/15206194/jdbc-mysql-save-timestamp-always-using-utc
The point is, if you are counting on consistent behavior with regard to
time in applications that touch the database, you will be disappointed.
>
> Regards...
--
Adrian Klaver
adrian.klaver@aklaver.com