-
Notifications
You must be signed in to change notification settings - Fork 30
MOB-5721 fix date pattern for QueryDate, hh --> HH #92
Conversation
@@ -29,7 +29,7 @@ | |||
* The converter factory used for Jackson JSON conversion | |||
*/ | |||
public class JacksonConverterFactory extends Converter.Factory { | |||
public final static String ISO_8601_DATE_PATTERN = "yyyy-MM-dd'T'hh:mm:ss.SS'Z'"; | |||
public final static String ISO_8601_DATE_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SS'Z'"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you, this is correct now!
|
||
@Test | ||
public void test24HourDateConversions() { | ||
ZonedDateTime date = ZonedDateTime.parse("2018-06-04T09:07:30-04:00"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs the "Z" at the end ("2018-06-04T09:07:30-04:00Z") to match the ISO-8601 format that AppConnect uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, probably worth updating the unit test to match the ISO-8601 format that AppConnect uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a bug fix, could you please bump the version to 5.2.2 here?
@ggrell Once this is released, I will modify toolkit and listbuilder to point to 5.2.2. |
PROBLEM
The date String pattern used by the QueryDate class did not support 24 hr time, and would produce incorrect date strings when used in service queries
SOLUTION
Modified the string pattern hours from hh to HH
TESTING
A new unit test has been added to test that 24 hour time is supported in QueryDateTests.java