Description
When executing SQL queries via the /v1/cubesql HTTP endpoint with a timezone parameter, the timezone is only applied to the Cube load request but not to SQL functions like DATE(), NOW(), CURRENT_DATE, etc. that are executed within the Cube SQL layer.
Current Behavior
When I pass a timezone to /v1/cubesql:
POST /v1/cubesql
{
"query": "SELECT DATE(order_date) as order_day FROM Orders",
"timezone": "America/Los_Angeles"
}
The DATE() function still operates in UTC, not in the specified timezone (America/Los_Angeles).
Expected Behavior
When a timezone parameter is provided, all date/time operations in the SQL query should respect that timezone.
For example:
SELECT DATE(order_date) as order_day FROM Orders
With timezone: "America/Los_Angeles", if order_date is 2024-01-15T02:00:00Z (UTC), the DATE() function should return 2024-01-14 (since 2 AM UTC is 6 PM on Jan 14 in LA), not 2024-01-15.
Version:
v1.6.6.