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 <[email protected] 
> (mailto:[email protected])> 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
> > 
> 
> 
> 


------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to