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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from constantcontact/MOB-5721-zulu-pattern
MOB-5721 fix date pattern for QueryDate, hh --> HH
- Loading branch information
Showing
3 changed files
with
21 additions
and
2 deletions.
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"); | ||
QueryDate qd = new QueryDate(date.toInstant().toEpochMilli()); | ||
assertThat(qd.toString().indexOf("2018-06-04T13:07:30.00Z"), not(equalTo(-1))); | ||
} | ||
} |