Rejected
Details
Assignee
UnassignedUnassignedReporter
ChrisPChrisPComponents
Priority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
ChrisP
ChrisPComponents
Priority
Created September 10, 2010 at 11:07 PM
Updated July 8, 2014 at 3:11 PM
Resolved July 8, 2014 at 3:11 PM
When you using DbTimestamp to use the database to seed the timestamp (for the @Version oplock field), this delegates to getCurrentTimestampSelectString().
On Oracle 10g this invokes "select systimestamp from dual". This returns the server's local time. This causes problems when crossing the cutoff between (for example) British Summer Time and UTC. The standard SQL function, current_timestamp (returned by getCurrentTimestampSQLFunctionName should be used instead. This always returns UTC time.
public String getCurrentTimestampSelectString() {
return "select systimestamp from dual"; // suggest changing to
// return "select " + getCurrentTimestampSQLFunctionName() + " from dual";
}
public String getCurrentTimestampSQLFunctionName() {
// the standard SQL function name is current_timestamp...
return "current_timestamp";
}
NB getCurrentTimestampSelectString() is only referenced from the DbTimestamp class