Skip to content

Commit

Permalink
EPMRPP-90180 update dependencies (Instant time) (#53)
Browse files Browse the repository at this point in the history
* EPMRPP-90180 update dependencies (Instant time)

* EPMRPP-90180 update dependencies (Instant time)
  • Loading branch information
grabsefx authored Apr 15, 2024
1 parent 574d348 commit a90f8b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ dependencies {
implementation 'com.epam.reportportal:plugin-api'
annotationProcessor 'com.epam.reportportal:plugin-api'
} else {
implementation 'com.github.reportportal:commons-dao:fa04c1f'
implementation 'com.github.reportportal:plugin-api:20ab960'
annotationProcessor 'com.github.reportportal:plugin-api:20ab960'
implementation 'com.github.reportportal:commons-dao:0703b75'
implementation 'com.github.reportportal:plugin-api:3ecb915657'
annotationProcessor 'com.github.reportportal:plugin-api:3ecb915657'
}
implementation 'org.hibernate:hibernate-core:5.6.15.Final'

implementation group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
implementation group: 'org.jooq', name: 'jooq', version: '3.14.4'
jooqRuntime 'org.postgresql:postgresql:42.2.13'
jooqRuntime 'org.postgresql:postgresql:42.7.3'

compile 'ch.qos.logback:logback-classic:1.2.3'
compile 'org.slf4j:slf4j-api:1.7.25'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.epam.reportportal.rules.exception.ErrorType;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.ZoneOffset;
import java.util.Collections;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
Expand Down Expand Up @@ -152,7 +153,8 @@ private void updateWithLog(StringBuilder descriptionBuilder, Log log, boolean in
private String getFormattedMessage(Log log) {
StringBuilder messageBuilder = new StringBuilder();
ofNullable(log.getLogTime()).ifPresent(logTime -> messageBuilder.append(" Time: ")
.append(dateFormat.format(TO_DATE.apply(logTime))).append(", "));
.append(dateFormat.format(
TO_DATE.apply(logTime.atOffset(ZoneOffset.UTC).toLocalDateTime()))).append(", "));
ofNullable(log.getLogLevel()).ifPresent(
logLevel -> messageBuilder.append("Level: ").append(logLevel).append(", "));
messageBuilder.append("Log: ").append(log.getLogMessage()).append("\n");
Expand All @@ -179,4 +181,4 @@ private void addAttachment(StringBuilder descriptionBuilder, Attachment attachme

}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.epam.ta.reportportal.entity.integration.IntegrationParams;
import com.epam.ta.reportportal.entity.integration.IntegrationType;

import java.time.Instant;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -58,7 +59,7 @@ private void createIntegration(String name, IntegrationType integrationType) {
Integration integration = new Integration();
integration.setName(name);
integration.setType(integrationType);
integration.setCreationDate(LocalDateTime.now());
integration.setCreationDate(Instant.now());
integration.setEnabled(true);
integration.setCreator("SYSTEM");
integration.setParams(new IntegrationParams(new HashMap<>()));
Expand Down

0 comments on commit a90f8b0

Please sign in to comment.