Re: Timestamp without Timezone and differing client / server tzs - Mailing list pgsql-jdbc

From Ken Johanson
Subject Re: Timestamp without Timezone and differing client / server tzs
Date
Msg-id 487439D8.2050508@kensystem.com
Whole thread Raw
In response to Re: Timestamp without Timezone and differing client / server tzs  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: Timestamp without Timezone and differing client / server tzs
List pgsql-jdbc
Oliver Jowett wrote:
> Ken Johanson wrote:
>
>> Question: with ts without tz storage, should not a timestamp be
>> normalized to the  servers implicit TZ (UTC in this case), since that
>> is set in the config's client-tz?
>
> If you don't specify a Calendar to setTimestamp, it's assumed you mean
> the client JVM's default timezone (the same timezone that
> Timestamp.toString() assumes).

.......

> If you want to interpret a Timestamp as being in a particular timezone,
> use the getTimestamp()/setTimestamp() variants that take an explicit
> Calendar.

So, short of passing a calendar to setTimezone, there is no other way to
indicate to the driver that zone-less date/time type values should be
translated to the server's different timezone, is this correct?

k



pgsql-jdbc by date:

Previous
From: Scott Langley
Date:
Subject: Patch to allow setting schema/search_path in the connectionURL
Next
From: Oliver Jowett
Date:
Subject: Re: Timestamp without Timezone and differing client / server tzs