DATAMONGO-2217 - Fix zonded DateTime usage in test.

Original Pull Request: #654
This commit is contained in:
Minsu
2019-03-03 03:09:55 +09:00
committed by Christoph Strobl
parent 38fe8d4601
commit 9d307bd115

View File

@@ -90,6 +90,7 @@ import com.mongodb.client.MongoCollection;
* @author Nikolay Bogdanov
* @author Maninder Singh
* @author Sergey Shcherbakov
* @author Minsu Kim
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:infrastructure.xml")
@@ -1418,10 +1419,11 @@ public class AggregationTests {
mongoTemplate.dropCollection(ObjectWithDate.class);
DateTime dateTime = new DateTime() //
.withZone(DateTimeZone.UTC) //
.withYear(2014) //
.withMonthOfYear(2) //
.withDayOfMonth(7) //
.withTime(3, 4, 5, 6).toDateTime(DateTimeZone.UTC).toDateTimeISO();
.withTime(3, 4, 5, 6).toDateTimeISO();
ObjectWithDate owd = new ObjectWithDate(dateTime.toDate());
mongoTemplate.insert(owd);