Skip to content

Commit

Permalink
GitHub action test run fix attempt and test log
Browse files Browse the repository at this point in the history
  • Loading branch information
zubri committed Jan 8, 2025
1 parent 17f46f6 commit 8d592e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ class OffsetDateTimeAdapterTest {

@Test
void testOffsetDateTime() throws Exception {
ZoneId zoneId = ZoneOffset.systemDefault();
ZoneId zoneId = ZoneOffset.ofHours(-3);
OffsetDateTime dateTime = LocalDateTime.parse("2021-09-19T12:13:14")
.atZone(zoneId)
.withEarlierOffsetAtOverlap()
.withFixedOffsetZone()
.withEarlierOffsetAtOverlap()
.toOffsetDateTime();

String offset = dateTime.getOffset().getId();
String offset = "-03:00";

// DateTime without offset and with/without fractional seconds
testDateTimeImpl("2021-09-19T12:13:14", "2021-09-19T12:13:14" + offset);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void testMarshallNoOffset() throws Exception {
@Test
public void testOffsetTime() throws Exception {
ZoneOffset zoneOffset = ZoneId.systemDefault().getRules().getStandardOffset(Instant.now());
System.out.println("system zoneOffset: " + zoneOffset);

// DateTime without offset and with/without fractional seconds
testTimeImpl("12:13:14", "12:13:14" + zoneOffset);
Expand Down Expand Up @@ -109,6 +110,7 @@ private void testTimeImpl(String value, String valueResult) throws Exception {
OffsetTimeAdapter offsetTimeAdapter = new OffsetTimeAdapter();
OffsetTime OffsetTime = offsetTimeAdapter.unmarshal(value);
String valueDateResult = offsetTimeAdapter.marshal(OffsetTime);
System.out.println("Comparing: expected " + valueResult + " with actual " + valueDateResult);
assertEquals(valueResult, valueDateResult);
}

Expand Down

0 comments on commit 8d592e2

Please sign in to comment.