File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/main/java/Avalara/SDK Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -621,7 +621,13 @@ public String parameterToString(Object param) {
621
621
if (param instanceof Number || param instanceof Boolean ) {
622
622
return String .valueOf (param );
623
623
}
624
- if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate ) {
624
+ if (param instanceof OffsetDateTime odt ) {
625
+ // Convert to LocalDateTime and format as ISO_LOCAL_DATE_TIME
626
+ return odt
627
+ .toLocalDateTime ()
628
+ .format (DateTimeFormatter .ISO_LOCAL_DATE_TIME );
629
+ }
630
+ if (param instanceof Date || param instanceof LocalDate ) {
625
631
String jsonStr = json .serialize (param );
626
632
// e.g. "\"2025-05-06T12:00:00Z\"" → "2025-05-06T12:00:00Z"
627
633
return jsonStr .substring (1 , jsonStr .length () - 1 );
You can’t perform that action at this time.
0 commit comments