Skip to content

Commit

Permalink
Merge pull request #531 from IBM/lee-master
Browse files Browse the repository at this point in the history
issue #528 - use UTC in DateTimeHandlerTest and ParameterExtractionTest
  • Loading branch information
prb112 authored Dec 21, 2019
2 parents d90a288 + 69d39c6 commit 03ecee6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
import java.time.format.DateTimeFormatterBuilder;
import java.time.temporal.ChronoField;
import java.util.List;
import java.util.TimeZone;

import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import com.ibm.fhir.model.resource.SearchParameter;
Expand Down Expand Up @@ -99,6 +101,11 @@ public class ParameterExtractionTest {
private static final SearchParameter stringSearchParam = searchParamBuilder.type(SearchParamType.STRING).build();
private static final SearchParameter tokenSearchParam = searchParamBuilder.type(SearchParamType.TOKEN).build();

@BeforeClass
public void setSystemTimeZone() {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
}

@Test
public void testBoolean() throws FHIRPersistenceProcessorException {
JDBCParameterBuildingVisitor parameterBuilder = new JDBCParameterBuildingVisitor(tokenSearchParam);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
import java.time.Instant;
import java.time.temporal.ChronoField;
import java.time.temporal.TemporalAccessor;
import java.util.TimeZone;

import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import com.ibm.fhir.model.type.DateTime;
Expand All @@ -23,6 +25,11 @@

public class DateTimeHandlerTest {

@BeforeClass
public void setSystemTimeZone() {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
}

@Test
public void testYearParser() throws FHIRSearchException {
TemporalAccessor acc = DateTimeHandler.parse("2019");
Expand Down

0 comments on commit 03ecee6

Please sign in to comment.