diff options
Diffstat (limited to 'appc-dispatcher')
2 files changed, 5 insertions, 6 deletions
diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/main/java/org/onap/appc/executor/impl/CommandTask.java b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/main/java/org/onap/appc/executor/impl/CommandTask.java index 965664429..458814dab 100644 --- a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/main/java/org/onap/appc/executor/impl/CommandTask.java +++ b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/main/java/org/onap/appc/executor/impl/CommandTask.java @@ -48,8 +48,6 @@ import java.net.InetAddress; import java.util.UUID; import static com.att.eelf.configuration.Configuration.*; -import static com.att.eelf.configuration.Configuration.MDC_SERVICE_INSTANCE_ID; -import static com.att.eelf.configuration.Configuration.MDC_SERVICE_NAME; /** * This abstract class is base class for all Command tasks. All command task must inherit this class. diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java index 9d6c88883..aa6d203a5 100644 --- a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java +++ b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java @@ -74,7 +74,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.UUID; - +import java.util.TimeZone; import static com.att.eelf.configuration.Configuration.MDC_INSTANCE_UUID; import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID; import static com.att.eelf.configuration.Configuration.MDC_SERVER_FQDN; @@ -226,11 +226,11 @@ public abstract class AbstractRequestHandlerImpl implements RequestHandler { } updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.STATE, record.getRequestState()); updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.RESULT_CODE, - String.valueOf(record.getResultCode())); + String.valueOf(record.getResultCode())); if (RequestStatus.valueOf(record.getRequestState()).isTerminal()) { - Date endTime = new Date(System.currentTimeMillis()); + Date endTime = new Date(); updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.END_TIME, - dateToStringConverterMillis(endTime)); + dateToStringConverterMillis(endTime)); } try { transactionRecorder.update(record.getTransactionId(), updateColumns); @@ -461,6 +461,7 @@ public abstract class AbstractRequestHandlerImpl implements RequestHandler { public static String dateToStringConverterMillis(Date date) { SimpleDateFormat customDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + customDate.setTimeZone(TimeZone.getTimeZone("UTC")); if (date != null) { return customDate.format(date); } |