pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Lukas Eder <lukas.eder@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: java.sql.ResultSet.getTime() returns wrong time
Date: Sun, 19 Sep 2010 17:43:20 -0400
Message-ID: <9641.1284932600@sss.pgh.pa.us> (raw)
In-Reply-To: <4C968069.4050801@opencloud.com>
References: <AANLkTinN6yX+=Wz+iZzsnWZhp4+bNfA7uRB+RoHsyoof@mail.gmail.com>
	<4C968069.4050801@opencloud.com>

Oliver Jowett <oliver@opencloud.com> writes:
> Did you see Kris's earlier response here? See
> http://archives.postgresql.org/pgsql-jdbc/2010-05/msg00052.php. The
> problem is we need to pass around a timezone offset, but JDBC +
> java.util.Date give us no way to do that without subclassing those types
> (which seems a bit hairy). Without that extra data, timetz just doesn't
> map well to any of the standard Java date/time types.

timetz is a fundamentally brain-dead data type to start with ---
it simply doesn't carry enough information to deal with timezones
meaningfully, at least not once you start considering DST changes.
This is the SQL standard's fault not ours, so there's not a lot
we can do about it other than recommend people avoid timetz.

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <9641.1284932600@sss.pgh.pa.us>
Permalink:  ../9641.1284932600@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9641.1284932600@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, oliver@opencloud.com, lukas.eder@gmail.com
  Subject: Re: java.sql.ResultSet.getTime() returns wrong time
  In-Reply-To: <9641.1284932600@sss.pgh.pa.us>
  References: <AANLkTinN6yX+=Wz+iZzsnWZhp4+bNfA7uRB+RoHsyoof@mail.gmail.com> <4C968069.4050801@opencloud.com> <9641.1284932600@sss.pgh.pa.us>

* 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