pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedJDBC6.5-1.2 bug wrt timestamp
3+ messages / 2 participants
[nested] [flat]
* JDBC6.5-1.2 bug wrt timestamp
@ 1999-06-24 13:05 Rachel Greenham <rachel@enlarion.demon.co.uk>
0 siblings, 0 replies; 3+ messages in thread
From: Rachel Greenham @ 1999-06-24 13:05 UTC (permalink / raw)
To: pgsql-interfaces
I've just come across a bug in the latest JDBC driver for JDK1.2.
Given a field in the database which is of type timestamp, I've been
retrieving the value using ResultSet.getTimestamp("col") eg:
Date d = rs.getTimeStamp("col");
This has been fine under JDBC6.4
The error I get is:
Could not execute query (Bad Timestamp Format at 1999-06-09
15:34:05Africa/Algiers in {2})
The value in the database as seen by getString() is:
1999-06-29 00:00:00+01
The system timezone is set to "Europe/London".
OK, the first thing is that the Africa/Algiers bit seem to be a JVM
problem - ie: TimeZone.getDefault() returns timezone id "Africa/Algiers"
on my system, which is configured for "Europe/London". I'll be chasing
that separately.
Unfortunately, I couldn't override because
ResultSet.getTimestamp(String, TimeZone) hasn't been implemented yet
(that's the error I get anyway) but I also suspect from the above error
that it wouldn't work anyway.
For the time being I'm just getting the value as a String and parsing it
by hand.
--
Rachel
^ permalink raw reply [nested|flat] 3+ messages in thread
* RE: [INTERFACES] JDBC6.5-1.2 bug wrt timestamp
@ 1999-06-24 14:41 Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 1 reply; 3+ messages in thread
From: Peter Mount @ 1999-06-24 14:41 UTC (permalink / raw)
To: 'Rachel Greenham' <rachel@enlarion.demon.co.uk>; pgsql-interfaces
The getTimestamp() method is broken - it gets confused for any time zone
outside of GMT/BST. I've been given a patch for it, which I'm looking at
and should have committed by the weekend.
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: Rachel Greenham [mailto:rachel@enlarion.demon.co.uk]
Sent: Thursday, June 24, 1999 2:05 PM
To: pgsql-interfaces@postgreSQL.org
Subject: [INTERFACES] JDBC6.5-1.2 bug wrt timestamp
I've just come across a bug in the latest JDBC driver for JDK1.2.
Given a field in the database which is of type timestamp, I've been
retrieving the value using ResultSet.getTimestamp("col") eg:
Date d = rs.getTimeStamp("col");
This has been fine under JDBC6.4
The error I get is:
Could not execute query (Bad Timestamp Format at 1999-06-09
15:34:05Africa/Algiers in {2})
The value in the database as seen by getString() is:
1999-06-29 00:00:00+01
The system timezone is set to "Europe/London".
OK, the first thing is that the Africa/Algiers bit seem to be a JVM
problem - ie: TimeZone.getDefault() returns timezone id "Africa/Algiers"
on my system, which is configured for "Europe/London". I'll be chasing
that separately.
Unfortunately, I couldn't override because
ResultSet.getTimestamp(String, TimeZone) hasn't been implemented yet
(that's the error I get anyway) but I also suspect from the above error
that it wouldn't work anyway.
For the time being I'm just getting the value as a String and parsing it
by hand.
--
Rachel
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] JDBC6.5-1.2 bug wrt timestamp
@ 1999-06-24 17:45 Rachel Greenham <rachel@enlarion.demon.co.uk>
parent: Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 0 replies; 3+ messages in thread
From: Rachel Greenham @ 1999-06-24 17:45 UTC (permalink / raw)
To: Peter Mount <petermount@it.maidstone.gov.uk>; +Cc: pgsql-interfaces
Peter Mount wrote:
>
> The getTimestamp() method is broken - it gets confused for any time zone
> outside of GMT/BST. I've been given a patch for it, which I'm looking at
> and should have committed by the weekend.
>
> Peter
>
> --
> Peter Mount
> Enterprise Support
> Maidstone Borough Council
> Any views stated are my own, and not those of Maidstone Borough Council.
Coo! I grew up in Maidstone!
I'm better now. :->
--
Rachel
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-06-24 17:45 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-06-24 13:05 JDBC6.5-1.2 bug wrt timestamp Rachel Greenham <rachel@enlarion.demon.co.uk>
1999-06-24 14:41 RE: [INTERFACES] JDBC6.5-1.2 bug wrt timestamp Peter Mount <petermount@it.maidstone.gov.uk>
1999-06-24 17:45 ` Rachel Greenham <rachel@enlarion.demon.co.uk>
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