While messing with SQLServer I've hit an issue with one of the date tests
failing. It passes on master even though the same issue is present in the
convertor. So I'm unsure as to what I'm doing wrong - if you consider this
test (that could be added to TemporalConvertorFactoryTest in main
org.geotools.utils )

public void testDatetoDate() throws Exception {
    Date date = new SimpleDateFormat("yyyy-dd-MM").parse("2009-28-06");
    assertNotNull(factory.createConverter(Date.class, java.sql.Date.class,
null));

    java.sql.Date output = (java.sql.Date)
factory.createConverter(Date.class, java.sql.Date.class,
null).convert(date, java.sql.Date.class);

    assertEquals("2009-06-28", output);
}

It fails as the convertor reduces the time to GMT which forces it in the
previous day (if you are in the UK anyway) so the answer comes back as
2009-06-27. I can't decide if this is correct or not and the comments don't
offer any help.

But in the JDBCDateTests testFilterByDate - runs two queries one with
2009-06-29 as a string and once as a date object. The first correctly
returns 2 rows and the second fails as it only returns 1 bacause the day
has changed.

But I can't see any changes I've made between my sqlserver-jtds branch and
master that would cause this to work before. So if anyone can throw some
light on this I'd be very grateful.

Cheers

Ian
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to