Search Postgresql Archives

Re: Timezone information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/20/2014 04:29 AM, Dev Kumkar wrote:
On Thu, Feb 20, 2014 at 3:53 AM, Adrian Klaver
<adrian.klaver@xxxxxxxxxxx <mailto:adrian.klaver@xxxxxxxxxxx>> 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@xxxxxxxxxxxxx>


    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@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux