Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten Haraldsen committed Jan 22, 2024
1 parent a185a32 commit e9a4a3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/main/java/com/ethlo/time/DateTime.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,6 @@ public LocalDateTime toLocalDatetime()
public OffsetDateTime toOffsetDatetime()
{
assertMinGranularity(Field.MINUTE);
return toOffsetDatetimeNoGranularityCheck();
}

public OffsetDateTime toOffsetDatetimeNoGranularityCheck()
{
if (offset != null)
{
return OffsetDateTime.of(year, month, day, hour, minute, second, nano, offset.toZoneOffset());
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/com/ethlo/time/LenientParseTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ public class LenientParseTests
@Test
public void testParseTimestampAndUseTemporalAccessor()
{
final String s = "2018-11-01T14:45:59.12356789+04:00";
final String s = "2018-11-01T14:45:59.123456789+04:00";
final DateTime a = ITU.parseLenient(s);
assertThat(a.getFractionDigits()).isEqualTo(9);
assertThat(Instant.from(a)).isEqualTo(OffsetDateTime.parse(s).toInstant());
}

Expand Down

0 comments on commit e9a4a3c

Please sign in to comment.