pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tim Joyce <tim@hoop.co.uk>
To: Tim Joyce <tim@hoop.co.uk>
To: Peter Mount <peter@retep.org.uk>
To: paneris messageboard <paneris@messageboards.paneris.org>
To: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] ResultSet.getDate
Date: Mon, 15 Nov 1999 14:29:42 -0000
Message-ID: <025e01bf2f75$ef391d40$0501a8c0@noonoo> (raw)
References: <Pine.LNX.4.10.9909261413390.3910-100000@maidast.retep.org.uk>
	<01a501bf2f5c$b6f9e3b0$0501a8c0@noonoo>

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
>
>
>
>
>
> ************




view thread (22+ messages)  latest in thread

Message-ID: <025e01bf2f75$ef391d40$0501a8c0@noonoo>
Permalink:  ../025e01bf2f75$ef391d40$0501a8c0@noonoo/
Also on:    postgresql.org/message-id/025e01bf2f75$ef391d40$0501a8c0@noonoo

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tim@hoop.co.uk, peter@retep.org.uk, paneris@messageboards.paneris.org
  Subject: Re: [INTERFACES] ResultSet.getDate
  In-Reply-To: <025e01bf2f75$ef391d40$0501a8c0@noonoo>

* 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