Will Herring
01/05/2023, 11:18 AM2023-01-05T10:38:01.611240928Z, and the pact-js docs require a format string to match against in java simple date format. I’m currently using the format string yyyy-MM-dd'T'HH:mm:ss.SSS'Z' Where I believe SSS is just meant to represent milliseconds in general. However this returns an error from the verifier that reads Error(Nom("171690Z", Tag)). If I update the format string to include 9 S’s, to represent the amount of milliseconds we return in the response, I then get the error Error(InvalidMillisecond("294910091")). Does anyone have any idea how I could alter my format string to get it working? To add, it seems like java SimpleDateTime doesn’t handle nanoseconds, so I’m wondering if my next best solution is to just write a regex for it instead.Timothy Jones
01/05/2023, 12:27 PMWhere I believe SSS is just meant to represent milliseconds in general.That’s my understanding too. However, your string seems to say 611240928 milliseconds, I think? That doesn’t match
SSS, as it’s not in the range 0-999.Timothy Jones
01/05/2023, 12:29 PMIf I update the format string to include 9 S’s, to represent the amount of milliseconds we return in the responseA millisecond is a thousandth of a second. 611,240,928 milliseconds is nearly a week of time.
Timothy Jones
01/05/2023, 12:30 PMHH:mm:ss.SSS format any time as 12:00:00.1500, because that would more correctly be formatted as 12:00:01.500Timothy Jones
01/05/2023, 12:32 PMHH:mm:ss.nnnnnnnnnTimothy Jones
01/05/2023, 12:36 PMWill Herring
01/24/2023, 10:27 AMnnnnnnnnn was exactly what was needed! Slightly frustrating that that Java documentation didn’t mention this, and that all the stackoverflow questions I saw said it wasn’t supported or something. I guess in retrospect the error does sort of make sense. I’m not exactly sure what else I’d expect Pact to respond with tbf, it’s expecting milliseconds based on the format string I gave it, and the bit at the end certainly wasn’t in milliseconds 🤔Timothy Jones
01/24/2023, 11:10 AM