Re: [INTERFACES] JDBC, Timestamps, and DateStyle
От | Peter T Mount |
---|---|
Тема | Re: [INTERFACES] JDBC, Timestamps, and DateStyle |
Дата | |
Msg-id | Pine.LNX.3.96.981027105346.4458F-100000@taer.maidstone.gov.uk обсуждение исходный текст |
Ответ на | JDBC, Timestamps, and DateStyle (Aleksey Demakov <avd@gcom.ru>) |
Список | 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
В списке pgsql-interfaces по дате отправления: