From: Jody G. <jod...@gm...> - 2011-11-06 07:40:12
|
Here is the fix: public void testFiltersByDate() throws Exception { FeatureSource fs = dataStore.getFeatureSource( tname("dates") ); FilterFactory ff = dataStore.getFilterFactory(); DateFormat df = new SimpleDateFormat("yyyy-dd-MM"); df.setTimeZone( TimeZone.getTimeZone("PST")); Date date = df.parse("2009-28-06"); //less than Filter f = ff.lessOrEqual( ff.property( aname("d") ), ff.literal( date ) ); assertEquals( 2, fs.getCount( new DefaultQuery(tname("dates"),f ) ) ); f = ff.lessOrEqual( ff.property( aname("d") ),ff.literal( df.parse("2009-28-06") ) ); assertEquals( 2, fs.getCount( new DefaultQuery(tname("dates"),f ) ) ); } Nailed it down to a specific timezone; and use the same simple data format for both.... -- Jody Garnett On Sunday, 6 November 2011 at 5:31 PM, Michael Bedward wrote: > Thanks Jody. Pleased it's not just me :) > > Michael > > On 6 November 2011 18:24, Jody Garnett <jod...@gm... (mailto:jod...@gm...)> wrote: > > Micheal I can confirm that my build is now broken in the same spot; sorry > > did not reply earlier this has been my first full build since you reported > > the problem. > > -- > > Jody Garnett > > > > > |