Since daylight savings started here almost two weeks ago we have noticed that any queries on our new ColdFusion site that restrict dates in the following manner are returning incorrect data (where StartDate is in the format dd-mmm-yyyy).
select ...
from ...
where ...
and o.booking_date >= date('#StartDate#')
and o.booking_date < date('#StartDate#') + date('1 day')
We have found that if StartDate is altered as follows then the correct data is returned:
and booking_date >= '#DateFormat(DateAdd("d",-1,StartDate), "dd-mmm-yyyy")# 13:00'
and booking_date < '#DateFormat(StartDate, "dd-mmm-yyyy")# 13:00'
The time on our CF server is correct and is set to UTC+10:00 with automatic adjustments for Daylight Saving Time enabled. The time setting in the Ingres II Visual Manager (II_TIMEZONE_NAME) is set to AUSTRALIA-VICTORIA.
We are using ColdFusion 10 with connections to an Ingres database via JDBC. Our old ColdFusion 4.5 server that uses an ODBC connection to the Ingres database does not suffer from this problem so I assume the problem we are having must be somehow related to either ColdFusion 10 or the JDBC connection we are now using.
Any ideas as to why this is happening? Why does a pure UTC date/time (i.e. with no time adjustment) need to be specified when doing something like that shown in the first example above?
Thanks.