[Fdo-trac] [fdo-trac] #644: Sqlite filtering on date returns wrong results
FDO
trac_fdo at osgeo.org
Wed Oct 7 07:14:49 PDT 2026
#644: Sqlite filtering on date returns wrong results
-----------------------------+----------------------------
Reporter: bscott | Owner: traianstanev
Type: defect | Status: closed
Priority: major | Milestone: 3.5.0
Component: SQLite Provider | Version: 3.5.0
Severity: 3 | Resolution: fixed
Keywords: | External ID:
-----------------------------+----------------------------
Changes (by jng):
* resolution: => fixed
* status: new => closed
Comment:
In [changeset:"8383" 8383]:
{{{#!CommitTicketReference repository="" revision="8383"
Fix SQLite DATE filters on DateTime properties
DateToString() now renders a date-only FdoDateTime in the canonical
datetime form (YYYY-MM-DDTHH:MM:SS.mmm), so DATE literal filters compare
correctly against stored DateTime text. Previously '= DATE' matched no
rows and '> DATE' / '<= DATE' matched the wrong rows.
Note the behaviour change: a date-only value is now stored and read back
as a midnight timestamp (hour 0 rather than -1). InsertTest declares
DefaultsTime() to reflect this.
Also adds DateTimeFilterTest covering DATE, TIMESTAMP and null filters.
Fixes #644
}}}
--
Ticket URL: <https://trac.osgeo.org/fdo/ticket/644#comment:5>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list