Use DateTimeUtils.currentTimeMillis() to get current time
This method from joda-time supports replacing the system time provider with a custom provider for tests. Since it is verbose, and we expect more related methods, put it in the more succinct TimeUtil.nowMs(). This commit covers the trivial cases in the server side; client-side code still uses System.currentTimeMillis(). Change-Id: I6c56e8c5bbb0cf7b0271e431d1ebdb532967b9e8
This commit is contained in:
@@ -39,6 +39,7 @@ import com.google.gerrit.server.git.GitRepositoryManager;
|
||||
import com.google.gerrit.server.git.MetaDataUpdate;
|
||||
import com.google.gerrit.server.git.ProjectConfig;
|
||||
import com.google.gerrit.server.git.VersionedMetaData.BatchMetaDataUpdate;
|
||||
import com.google.gerrit.server.util.TimeUtil;
|
||||
import com.google.gwtorm.jdbc.JdbcSchema;
|
||||
import com.google.gwtorm.server.OrmException;
|
||||
import com.google.inject.Inject;
|
||||
@@ -348,7 +349,7 @@ public class Schema_65 extends SchemaVersion {
|
||||
" reviewed_on, review_comments " +
|
||||
"FROM account_agreements WHERE status = 'V'");
|
||||
try {
|
||||
long minTime = System.currentTimeMillis();
|
||||
long minTime = TimeUtil.nowMs();
|
||||
while (rs.next()) {
|
||||
Account.Id accountId = new Account.Id(rs.getInt(1));
|
||||
Account.Id reviewerId = new Account.Id(rs.getInt(4));
|
||||
|
||||
Reference in New Issue
Block a user