Skip to content

Commit

Permalink
Merge pull request #469 from fr4nk/fix-fakeValuesServiceTest-for-locales
Browse files Browse the repository at this point in the history
fix FakeValuesServiceTest / pastDate + futureDate for local test
  • Loading branch information
codingricky authored Feb 8, 2020
2 parents ac3a206 + 9cfdde1 commit ec7c9d6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void expressionWithValidFakerObjectValidMethodInvalidArgs() {

@Test
public void futureDateExpression() throws ParseException {
SimpleDateFormat dateFormat = new SimpleDateFormat( "EEE MMM dd HH:mm:ss z yyyy" );
SimpleDateFormat dateFormat = new SimpleDateFormat( "EEE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH );

Date now = new Date();
Date nowPlus10Days = new Date( now.getTime() + MILLIS_IN_A_DAY * 10 );
Expand All @@ -247,7 +247,7 @@ public void futureDateExpression() throws ParseException {

@Test
public void pastDateExpression() throws ParseException {
SimpleDateFormat dateFormat = new SimpleDateFormat( "EEE MMM dd HH:mm:ss z yyyy" );
SimpleDateFormat dateFormat = new SimpleDateFormat( "EEE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH );

Date now = new Date();
Date nowMinus5Hours = new Date( now.getTime() - MILLIS_IN_AN_HOUR * 5 );
Expand Down

0 comments on commit ec7c9d6

Please sign in to comment.