Report Period conditions use timezone offset for Date field types #9805
Labels
Area: Reports
Issues & PRs related to all things regarding reports
Priority:Important
Issues & PRs that are important; broken functions, errors - there are workarounds
Status:Fix Proposed
A issue that has a PR related to it that provides a possible resolution
Type:Bug
Bugs within the core SuiteCRM codebase
Issue
When a User has set a different timezone and they attempt to report on Date fields, the CRM queries the database using a datetime value with an offset for the timezone. This provides incorrect results as the query will assume a date type has a midnight timestamp.
Expected Behavior
When the the user has set a timezone that is not the same as the database timezone.
The Date Period condition will return the correct results for "Today", "Yesterday" etc
Actual Behavior
When the the user has set a timezone that is not the same as the database timezone.
Date Period conditions of "Yesterday" will return dates from "Today" if the timezone is behind the db timezone.
Possible Fix
If the field type is "datetime" then provide an offset value, else use the midnight value for "date"
Steps to Reproduce
Context
Your Environment
The text was updated successfully, but these errors were encountered: