Open IanMeta opened 7 months ago
Hi @IanMeta 👋
Cube automatically converts to necessary timezones only dimensions that are used as time dimensions in queries. So, you can avoid this kind of conversion by referencing your dimension as a regular one.
A temporary solution for us is to set the time dimension as string type. This is a fine workaround as well.
Hi @IanMeta 👋
Cube automatically converts to necessary timezones only dimensions that are used as time dimensions in queries. So, you can avoid this kind of conversion by referencing your dimension as a regular one.
A temporary solution for us is to set the time dimension as string type. This is a fine workaround as well.
Yes. However, we would still like to access other features of the time dimensions like the various date functions in PostgreSQL such as date_trunc
. Thus it would be helpful if there is an option just to disable to automatic timezone conversion.
Gotcha. Let me add @paveltiunov to check what his thoughts are about having such an option.
Is your feature request related to a problem? Please describe. Currently, there is no way to turn off Timezone Conversion for CubeJS query rewrite for time dimensions. This caused some problems when the Time is already converted to the specific timezone based on the columns in the table. E.g. CubeJS PostgreSQL query:
MySQL rewrite:
This not only converts to timezone to an unintended value, but also caused an unexpected error in the underlying MySQL engine due to using the CONVERT_TZ function twice (although this error is the query engine's responsibility, we would still like the option to disable timezone conversion).
Describe the solution you'd like Add a configuration option in cube.js or cube schema to disable timezone conversion.
Describe alternatives you've considered A temporary solution for us is to set the time dimension as string type.