From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Dev Kumkar <devdas(dot)kumkar(at)gmail(dot)com> |
Cc: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Timezone information |
Date: | 2014-02-20 15:57:43 |
Message-ID: | 530625F7.50204@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 02/20/2014 04:29 AM, Dev Kumkar wrote:
> On Thu, Feb 20, 2014 at 3:53 AM, Adrian Klaver
> <adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)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(dot)10400(at)__opencloud(dot)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(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2014-02-20 16:00:05 | Re: Timezone information |
Previous Message | Rémi Cura | 2014-02-20 15:57:39 | Re: [postgis-users] postgis in postgresql apt and upgrades |