Navigation Menu

Skip to content

Commit

Permalink
pass in a calendar object so that the system's default timezone is us…
Browse files Browse the repository at this point in the history
…ed if none is specified. this was changed to resolve an issue with oracle for columns defined with a data type of TIMESTAMP WITH TIMEZONE when they had a value that was in the spring ahead range.
  • Loading branch information
chenson42 committed Dec 28, 2011
1 parent f17af28 commit 22cab3e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -297,10 +297,10 @@ private static void setValue(PreparedStatement ps, int paramIndex, int sqlType,
} else if (sqlType == Types.TIMESTAMP) {
if (inValue instanceof java.util.Date) {
if (inValue instanceof java.sql.Timestamp) {
ps.setTimestamp(paramIndex, (java.sql.Timestamp) inValue);
ps.setTimestamp(paramIndex, (java.sql.Timestamp) inValue, Calendar.getInstance());
} else {
ps.setTimestamp(paramIndex,
new java.sql.Timestamp(((java.util.Date) inValue).getTime()));
new java.sql.Timestamp(((java.util.Date) inValue).getTime()), Calendar.getInstance());
}
} else if (inValue instanceof Calendar) {
Calendar cal = (Calendar) inValue;
Expand Down

0 comments on commit 22cab3e

Please sign in to comment.