Recently, when I have been using the dimension_group with type time, it has been reverting my dates back a day. For example, in my query I would have a column of dates depicting only the first day of the month. (ex: 2021-03-01, 2021-12-01). But when I input this column into the LookML dimension_group, I start seeing the dates with a day subtracted (ex: 2021-02-28, 2021-11-31).
Why does this happen? How can I fix this?
Solved! Go to Solution.
Recently, when I have been using the dimension_group with type time, it has been reverting my dates back a day. For example, in my query I would have a column of dates depicting only the first day of the month. (ex: 2021-03-01, 2021-12-01). But when I input this column into the LookML dimension_group, I start seeing the dates with a day subtracted (ex: 2021-02-28, 2021-11-31).
Why does this happen? How can I fix this?
Hi, You might want to add ‘convert_tz: no’ as a keyword to your dimension definition this should fix it. kr Victor
Hi Blee,
It looks like it is a Looker Timezone setting.
Please find the following steps to set the desired timezone output:
1.- Go to Admin section and select “Databases → Connections”
2.- Find the SQL database that your project is using and click on “Edit” button.
3.- Find the option “Database Timezone” and select the properly timezone.
4.- Click on “Update connection” button to save all changes.
Hope it helps!
Best regards,
Leo
Recently, when I have been using the dimension_group with type time, it has been reverting my dates back a day. For example, in my query I would have a column of dates depicting only the first day of the month. (ex: 2021-03-01, 2021-12-01). But when I input this column into the LookML dimension_group, I start seeing the dates with a day subtracted (ex: 2021-02-28, 2021-11-31).
Why does this happen? How can I fix this?
Hi, You might want to add ‘convert_tz: no’ as a keyword to your dimension definition this should fix it. kr Victor
Thank you for the help! I used KAEYV’s solution as I didn’t want to convert timezones of all my data.