Fix setObject() with Time/Timestamp/Date + Timezones - Mailing list pgsql-jdbc

From Kim Ho
Subject Fix setObject() with Time/Timestamp/Date + Timezones
Date
Msg-id 1057584211.21368.20.camel@topanga.toronto.redhat.com
Whole thread Raw
List pgsql-jdbc
Problem:
 - Doesn't accept any object of java.util.Date
 - Doesn't handle strings
 - Doesn't deal with timezones (when used with strings)

Fix:
 - Grab timezones from strings (if any) and change to java.util.Date
 - Use getTime() to get milliseconds value to get correct
Date/Time/Timestamp

The setObjects where java.util.Dates are passed in are very
straightforward.

The ones with the Strings passed in take a bit of work. I attempted to
follow the guidelines of the toDate/Time/Timestamp in ResultSet and
incorporated timezones into them.

Attached is the patch, please have a look.

Comments/suggestions always welcome.

Cheers,

Kim


Attachment

pgsql-jdbc by date:

Previous
From: "Toka"
Date:
Subject: Unable to login when user name contains unicode symbols
Next
From: Felipe Schnack
Date:
Subject: maybe a serialization error?