Content
View differences
Updated by Aaron Contreras about 3 years ago
The `today` query operator is using `Date.today` which returns a date on the host machine's time zone. This is causing comparisons against the `created_at` column, stored in When UTC on the server.
Specifically when UTC and the host machine's current time are not referring to the same date, e.g. (UTC time is 01:00 May 31st, and the host's time is 17:00 May 30th).
Found with a failing spec 30th), specs that tested the `today` operator [https://github.com/opf/openproject/blob/95545a9c3341ba25901254583fa70fa3838eb7e8/spec/features/projects/projects\_index\_spec.rb#L491](https://github.com/opf/openproject/blob/95545a9c3341ba25901254583fa70fa3838eb7e8/spec/features/projects/projects_index_spec.rb#L491) test project filtering based on date filters fail. To narrow it down, those under https://github.com/opf/openproject/blob/95545a9c3341ba25901254583fa70fa3838eb7e8/spec/features/projects/projects\_index\_spec.rb#L491
Specifically when UTC and the host machine's current time are not referring to the same date, e.g. (UTC time is 01:00 May 31st, and the host's time is 17:00 May 30th).
Found with a failing spec