@@ -18,6 +18,9 @@ describe("QueryTest", function () {
1818 let store : IDocumentStore ;
1919
2020 beforeEach ( async function ( ) {
21+ testContext . customizeStore = async store => {
22+ store . conventions . storeDatesInUtc = true ;
23+ } ;
2124 store = await testContext . getDocumentStore ( ) ;
2225 } ) ;
2326
@@ -663,15 +666,15 @@ describe("QueryTest", function () {
663666 it ( "query where between with dates" , async ( ) => {
664667 const cocartFestival = new Event ( {
665668 name : "CoCArt Festival" ,
666- date : moment ( "2018-03-08 " ) . toDate ( )
669+ date : moment ( "2018-03-08T00:00:00Z " ) . toDate ( )
667670 } ) ;
668671 const openerFestival = new Event ( {
669672 name : "Open'er Festival" ,
670- date : moment ( "2018-07-04 " ) . toDate ( )
673+ date : moment ( "2018-07-04T00:00:00Z " ) . toDate ( )
671674 } ) ;
672675 const offFestival = new Event ( {
673676 name : "OFF Festival" ,
674- date : moment ( "2018-08-03 " ) . toDate ( )
677+ date : moment ( "2018-08-03T00:00:00Z " ) . toDate ( )
675678 } ) ;
676679
677680 {
@@ -693,10 +696,10 @@ describe("QueryTest", function () {
693696 assert . strictEqual ( indexQuery . query , "from events where date between $p0 and $p1" ) ;
694697 assert . strictEqual (
695698 indexQuery . queryParameters [ "p0" ] ,
696- DateUtil . default . stringify ( cocartFestival . date ) ) ;
699+ DateUtil . utc . stringify ( cocartFestival . date ) ) ;
697700 assert . strictEqual (
698701 indexQuery . queryParameters [ "p1" ] ,
699- DateUtil . default . stringify ( offFestival . date ) ) ;
702+ DateUtil . utc . stringify ( offFestival . date ) ) ;
700703 assert . strictEqual ( indexQuery . query , "from events where date between $p0 and $p1" ) ;
701704
702705 const festivalsHappeningBetweenCocartAndOffInclusive : any [ ] = await q . all ( ) ;
0 commit comments