Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 0b25706

Browse files
Merge pull request #64 from Venafi/fix_for_issue_63
Fix for issue #63
2 parents 43b2d15 + 8851309 commit 0b25706

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/java/com/venafi/vcert/sdk/utils/FeignUtils.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,13 @@ public OffsetDateTime deserialize(JsonElement json, Type typeOfT,
119119
String dateString = json.getAsString();
120120
Matcher input = msDate.matcher(dateString);
121121
if (!input.matches()) {
122-
return OffsetDateTime.parse(dateString, formatter);
122+
try {
123+
return OffsetDateTime.parse(dateString, formatter);
124+
} catch (Exception e) {
125+
return OffsetDateTime.parse(dateString, DateTimeFormatter.ISO_DATE_TIME);
126+
}
123127
}
128+
124129
// There is apocryphal, anecdotal evidence that the format can have an offset,
125130
// although the original blog post doesn't seem to mention it - and it would, indeed, be
126131
// counterproductive, as the JavaScript Date() constructor doesn't accept epoch with offset as

0 commit comments

Comments
 (0)