Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

MOB-5721 fix date pattern for QueryDate, hh --> HH #92

Merged
merged 4 commits into from
Jun 12, 2018

Conversation

MariDavila-zz
Copy link

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

@@ -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'";
Copy link
Member

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");
Copy link
Member

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.

Copy link
Member

@ggrell ggrell left a 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.

Copy link
Member

@ggrell ggrell left a 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?

@MariDavila-zz
Copy link
Author

@ggrell Once this is released, I will modify toolkit and listbuilder to point to 5.2.2.

@ggrell ggrell merged commit b50f769 into master Jun 12, 2018
@ggrell ggrell deleted the MOB-5721-zulu-pattern branch June 12, 2018 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants