getTimeStamp « Resultset « Java Database Q&A

1. Java ResultSet how to getTimeStamp in UTC

The database has data in UTC and when I try to get data

java.util.Calendar cal = Calendar.getInstance();
java.sql.Timestamp ts = resultSet.getTimestamp(PUBLISH_TIME);
Is there anything wrong with this?

2. ResultSet.getTimeStamp(1) is not work in some systems

I have the code ResultSet.getTimeStamp(1) in one servlet. Am using JDK 1.6 and Tomcat 6. In my system its work fine.But in server which have same configuration ResultSet.getTimestamp(1) throws invalid column type. ...

3. Informix and ResultSet.getTimestamp()