pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedJDBC timestamps with timezones
2+ messages / 2 participants
[nested] [flat]
* JDBC timestamps with timezones
@ 2001-03-04 23:32 David Wall <d.wall@computer.org>
0 siblings, 1 reply; 2+ messages in thread
From: David Wall @ 2001-03-04 23:32 UTC (permalink / raw)
To: pgsql-interfaces
In reading about how Timestamps are stored in Postgresql 7.1 (they are
stored in GMT based on the TZ in effect on the server running the backend),
I was wondering how this impacts JDBC.
We want to be able to retrieve timestamps from the database and then show
them to invididual users based on their specified timezone which we know in
advance. With Java, I can take a Date/Calendar and get the current time
using a specified TimeZone object. Does the JDBC then know to always
retrieve the timestamp and keep it internally as GMT, too so that all the
time zone stuff will work?
Thanks,
David
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: JDBC timestamps with timezones
@ 2001-03-05 00:01 Barry Lind <barry@xythos.com>
parent: David Wall <d.wall@computer.org>
0 siblings, 0 replies; 2+ messages in thread
From: Barry Lind @ 2001-03-05 00:01 UTC (permalink / raw)
To: David Wall <d.wall@computer.org>; +Cc: pgsql-jdbc@postgresql.org; pgsql-interfaces
You shouldn't have any problems with the 7.1 drivers doing what you
need. The 7.1 jdbc driver should correctly handle timezones. The 7.0
drivers didn't work correctly if the client timezone and server
timezones were different.
Since 7.1 is still in beta, please test it out and report any bugs you find.
thanks,
--Barry
David Wall wrote:
> In reading about how Timestamps are stored in Postgresql 7.1 (they are
> stored in GMT based on the TZ in effect on the server running the backend),
> I was wondering how this impacts JDBC.
>
> We want to be able to retrieve timestamps from the database and then show
> them to invididual users based on their specified timezone which we know in
> advance. With Java, I can take a Date/Calendar and get the current time
> using a specified TimeZone object. Does the JDBC then know to always
> retrieve the timestamp and keep it internally as GMT, too so that all the
> time zone stuff will work?
>
> Thanks,
> David
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-03-05 00:01 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-04 23:32 JDBC timestamps with timezones David Wall <d.wall@computer.org>
2001-03-05 00:01 ` Barry Lind <barry@xythos.com>
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