Hi Lookers
I have encountered a discrepancy between the Reported Date-time from the function now() when used inside LookML and the same function when used from the Table Calculation.
I need LookML to report the same time as the Local machine [Which is UTC+2]
Appreciate your help as this creates a discrepancy in many of my reports.
In table calculations it will be application timezone if no specific settings are used, and it will be evaluated once the query is returned.
So even if you had the same timezone in both I would still expect the discrepancy, You’d need to change application timezone to UTC if you wanted the same or use some kind of offset in the table calculation.
Or, perhaps you could use convert_tz: yes
in your metrics: https://docs.looker.com/reference/field-params/convert_tz
Hi Dawid
Hope you have a good day, and thanks for your response.
I want all calculations of Now() is to be in local time zone
But now the LookML calculates Now() as UTC like the database settings.
😔
What happens if you create a dimension in LookML and include convert_tz: yes
, can you check?
I am afraid it didn’t work either , I don’t understand why? 😬 😬 😬
But it works well in table calculation !
While Looker Settings is as below:
And
Can you try convert_tz
with a dimension? I think it doesn’t work with measures
I am afraid it gives the same values (UTC) , it never converts to the Local Time (GMT+2)
Hi Dawid
I believe I’ve Just found a workaround 😀
This will help me to get my calculation correct for this business case, If I am going to deal with different time Zones in the future, I Believe i will use Liquid parameter in filling the Now() measure.
Thanks a lot for your assist and time.
Been a long time this was posted but you can try enabling User Specific Time Zones and set your timezone on your Account page to the same as the Application Timezone Setting.