Fix setObject() with Time/Timestamp/Date + Timezones

Поиск
Список
Период
Сортировка
От Kim Ho
Тема Fix setObject() with Time/Timestamp/Date + Timezones
Дата
Msg-id 1057584211.21368.20.camel@topanga.toronto.redhat.com
обсуждение исходный текст
Список 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


Вложения

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Toka"
Дата:
Сообщение: Unable to login when user name contains unicode symbols
Следующее
От: Felipe Schnack
Дата:
Сообщение: maybe a serialization error?