pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dexdyne <from_postgresql_forum@dexdyne.com>
To: pgsql-jdbc@postgresql.org
Subject: time zone setting.
Date: Wed, 24 Aug 2011 03:25:31 -0700 (PDT)
Message-ID: <1314181531882-4729960.post@n5.nabble.com> (raw)

I have played about a bit with time zones, and think I am getting a grip on
them.

If I use PgAdmin to submit queries, I can put

set time zone 'us/hawaii';

in front of some other queries, and they will operate as I expect. In fact I
find the change persist across multiple PgAdmin queries, so it is obviously
a "session setting"

I'm aware that I can change the JVM timezone suing setdefault.

But I can't put the "set time zone" stretring on the front of a jdbc
preparedStatement - it just barfs.

So the question is - can I, from a java program, set the time zone for the
database [ not for the jvm ].

--
View this message in context: http://postgresql.1045698.n5.nabble.com/time-zone-setting-tp4729960p4729960.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.



view thread (7+ messages)  latest in thread

Message-ID: <1314181531882-4729960.post@n5.nabble.com>
Permalink:  ../1314181531882-4729960.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1314181531882-4729960.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: from_postgresql_forum@dexdyne.com
  Subject: Re: time zone setting.
  In-Reply-To: <1314181531882-4729960.post@n5.nabble.com>
  References: <1314181531882-4729960.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox