Skip to content

Commit

Permalink
AAE-29974 Fix datetime displayed as date (#1657)
Browse files Browse the repository at this point in the history
AAE-29974 add datetime to type registry
  • Loading branch information
tom-dal authored Jan 9, 2025
1 parent 2c278a5 commit 1328660
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class ProcessVariableValueConverter {
typeRegistry.put("boolean", Boolean.class);
typeRegistry.put("double", Double.class);
typeRegistry.put("date", Date.class);
typeRegistry.put("datetime", Date.class);
typeRegistry.put("localdate", LocalDate.class);
typeRegistry.put("bigdecimal", BigDecimal.class);
typeRegistry.put("json", JsonNode.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ void testProcessVariableValueConverterDateValue() {
assertThat(dateValue).isEqualTo(dateFormatterProvider.parse(DATE_1970_01_01T01_01_01_001Z));
}

@Test
void testProcessVariableValueConverterDatetimeValue() {
// when
Date dateValue = variableValueConverter.convert(
new ProcessVariableValue("Datetime", DATE_1970_01_01T01_01_01_001Z)
);

// then
assertThat(dateValue).isEqualTo(dateFormatterProvider.parse(DATE_1970_01_01T01_01_01_001Z));
}

@Test
void testProcessVariableValueConverterBigDecimalValue() {
assertThat(
Expand Down

0 comments on commit 1328660

Please sign in to comment.