Re: [INTERFACES] JDBC, Timestamps, and DateStyle

From: Peter T Mount <peter(at)taer(dot)maidstone(dot)gov(dot)uk>
To: Aleksey Demakov <avd(at)gcom(dot)ru>
Cc: pgsql-interfaces(at)postgresql(dot)org, Peter T Mount <peter(at)retep(dot)org(dot)uk>
Subject: Re: [INTERFACES] JDBC, Timestamps, and DateStyle
Date: 1998-10-27 10:55:14
Message-ID: Pine.LNX.3.96.981027105346.4458F-100000@taer.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On 27 Oct 1998, Aleksey Demakov wrote:

>
> I had problems reading datetime fields with the ResultSet.getTimestamp
> method. First, it looks like this method always assumes that DateStyle
> is ISO. At the same time the driver checks current DateStyle in the case
> of Dates and acts accordingly. IMHO, it's a bit incosistent.
>
> As I recall the ODBC driver has no such problems because it always uses
> the same format for communication with backend. It sets it when it opens
> a connection.

I had thought of doing the same, but ran out of time (other things forced
me away for a while)...

> But it is not my main problem since I can set DateStyle by myself.
>
> The other problem is that the driver simetimes fails to parse timestamps.
> I found two reasons for this. The first is that the timestamp can contain
> fractions of second. The second relates to timezones. I don't quite
> understand it, though. I simply rewrote the code so it works for me. And
> I believe it should also work for others.
>
> The patch is below.

I'll take a look at it when I get home.

[patch snipped]

Peter

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Aleksey Demakov 1998-10-27 11:51:31 JDBC, Timestamps, and DateStyle
Previous Message Herouth Maoz 1998-10-27 10:04:26 Re: [INTERFACES] applet don't go