Closed fibers closed 9 years ago
The time zone is set to GMT +1100 through
config.time_zone = 'Australia/Sydney'
The date helper is set to calender by
Wice::Defaults::HELPER_STYLE = :calendar
When I filter a datetime field 'created_at' by input the start date to '2014-10-21' and end date to '2014-10-21', the expected query should be
where created_at >= '2014-10-20 13:00:00' and created_at < '2014-10-21 13:00:00'
but actually the generated sql is
where created_at >= '2014-10-21' and created_at < '2014-10-22'
After I look into the source code, I find the following code in line 112 in file 'lib/wice/columns/column_datetime.rb'
conditions << opts[:fr].to_date
If I remove the 'to_date', the query will be generated correctly. What's the purpose of this 'to_date' conversion
Any comments ?
Anyone who can help on this?
check version 3.4.12 out
The time zone is set to GMT +1100 through
The date helper is set to calender by
When I filter a datetime field 'created_at' by input the start date to '2014-10-21' and end date to '2014-10-21', the expected query should be
but actually the generated sql is
After I look into the source code, I find the following code in line 112 in file 'lib/wice/columns/column_datetime.rb'
If I remove the 'to_date', the query will be generated correctly. What's the purpose of this 'to_date' conversion