Re: [INTERFACES] ResultSet.getDate

From: "Tim Joyce" <tim(at)hoop(dot)co(dot)uk>
To: "Tim Joyce" <tim(at)hoop(dot)co(dot)uk>, "Peter Mount" <peter(at)retep(dot)org(dot)uk>, "paneris messageboard" <paneris(at)messageboards(dot)paneris(dot)org>, <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] ResultSet.getDate
Date: 1999-11-15 14:29:42
Message-ID: 025e01bf2f75$ef391d40$0501a8c0@noonoo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Further to below,

I am now setting TZ=GMT PGDATESTYLE=ISO on postmaster startup:

finsbury=> select current_timestamp;
?column?
----------------------
1999-11-15 15:27:24+00
(1 row)

, but am still getting

- java.sql.SQLException: Bad Timestamp Format: at 0 in 1999-11-12 17:36:5EST

from the jdbc driver.

thanks for any help

timj

> > >
> > > >The date and time methods are being rewritten for 6.6 as they can't
> handle
> > > >some of the different time zones.
> > >
> > > Thanks, can I set postgres to pass dates to JDBC in a format that it
can
> > > understand?
> >
> > The SET DATESTYLE statement can be used to force the backend to return
> > dates in a particular format. The best one being ISO.
>
> This problem is still causing me headaches, I can change the timezone for
> the session:
>
> finsbury=> select current_timestamp ;
> ?column?
> ----------------------
> 1999-11-15 06:57:38-05
> (1 row)
>
> finsbury=> set timezone='gmt';
> SET VARIABLE
>
> finsbury=> select current_timestamp ;
> ?column?
> ----------------------
> 1999-11-15 11:58:37+00
> (1 row)
>
> And also for the postgres user (by setting PGTZ=GMT in.bash_profile),
> But how do I set the timezone when I start postgres so that dates are
always
> reported in GMT?
>
> postgresql 6.4
> RH6
>
> TIA
>
> timj
>
>
>
>
>
> ************

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 1999-11-15 15:00:10 Re: [INTERFACES] ResultSet.getDate
Previous Message Coleman, Andrew 1999-11-15 14:27:36 Re: [INTERFACES] my problems with ecpg and arrays