From: Tom Lane <tgl@sss.pgh.pa.us>
To: Roland Roberts <roland@astrofoto.org>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: ResultSet.getTimestamp(Calendar) off by one-hour
Date: Fri, 13 Mar 2009 16:16:35 -0400
Message-ID: <4747.1236975395@sss.pgh.pa.us> (raw)
In-Reply-To: <49BAAE48.8050705@astrofoto.org>
References: <49BA8D93.4010901@astrofoto.org>
<49BAAE48.8050705@astrofoto.org>
Roland Roberts <roland@astrofoto.org> writes:
> And here is what is in the database:
> roland=# select * from mytable;
> id | mytime
> ----+---------------------
> 12 | 2009-03-13 15:00:00
> (1 row)
Apparently you're using a timestamp WITHOUT time zone column to store
the data. Not recommended if you are worried about timezone effects,
since by definition the apparent value depends on caller's timezone
context. Use timestamp WITH time zone and see if it gets better.
regards, tom lane
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, roland@astrofoto.org
Subject: Re: ResultSet.getTimestamp(Calendar) off by one-hour
In-Reply-To: <4747.1236975395@sss.pgh.pa.us>
References: <49BA8D93.4010901@astrofoto.org> <49BAAE48.8050705@astrofoto.org> <4747.1236975395@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