Skip to content

Commit

Permalink
Use new time & date
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxtang-amazon committed Jul 27, 2023
2 parents 3357727 + 55c4496 commit fd62c15
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 229 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class ServiceLoaderUtil {
val fraction = partiqlTime.decimalSecond.remainder(BigDecimal.ONE)
val precision =
when {
fraction.scale() > 9 -> (partiqlTime.decimalSecond.remainder(BigDecimal.ONE) * BigDecimal.valueOf(1_000_000_000)).toInt()
fraction.scale() > 9 -> throw DateTimeException("Precision greater than nano seconds not supported")
else -> fraction.scale()
}

Expand Down Expand Up @@ -387,7 +387,7 @@ class ServiceLoaderUtil {
val fraction = partiqlTime.decimalSecond.remainder(BigDecimal.ONE)
val precision =
when {
fraction.scale() > 9 -> (partiqlTime.decimalSecond.remainder(BigDecimal.ONE) * BigDecimal.valueOf(1_000_000_000)).toInt()
fraction.scale() > 9 -> throw DateTimeException("Precision greater than nano seconds not supported")
else -> fraction.scale()
}

Expand Down
Loading

0 comments on commit fd62c15

Please sign in to comment.