This repository has been archived by the owner on Dec 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
MOB-5721 fix date pattern for QueryDate, hh --> HH #92
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7f6e267
MOB-5721 fix date pattern for QueryDate, hh --> HH
de371cd
MOB-5721 use full format for ISO-8601 dates, with "Z" at the end
69ededc
MOB-5721 the 'Z' is for zulu time only, not for time patterns with ti…
984227b
MOB-5721 increase the release version because of this bug fix
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
components/src/test/java/com/constantcontact/v2/QueryDateTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.constantcontact.v2; | ||
|
||
import org.junit.Test; | ||
|
||
import java.time.ZonedDateTime; | ||
|
||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.Matchers.equalTo; | ||
import static org.hamcrest.Matchers.not; | ||
|
||
public class QueryDateTests { | ||
|
||
@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 commentThe 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. |
||
QueryDate qd = new QueryDate(date.toInstant().toEpochMilli()); | ||
assertThat(qd.toString().indexOf("2018-06-04T13:07:30.00Z"), not(equalTo(-1))); | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!