Function Now() in Kanban Report Gives Different Timezone

Creation date: 18/07/2022 16:49    Updated: 18/07/2022 16:49   #dateiswrong #datetime
Question:

Summary of issue/request/query

 

We use =Now() for one of Kanban report, and it gives us result of GMT+8. We check the database server using  root@WMSDB-CML:~#timedatetc1, the time zone is Asia/Jakarta (WIB, +0700), but when we check with root@WMSDB-CML:~# cat /etc/timezone, the result is Asia/Shanghai

 T/ 1st Line Support Investigation Comment

Please advice how to get the correct time for the report, and should we change the timezone in etc/timezone?

Attachment


Answer:

Inform by vendor that this Now () is hardcoded into the Gemreport. Alternative way is to recreate the function Now () again using the steps below:

  1. User clicks to create a new dataset and add the query below

SELECTCONCAT(

         DATE_FORMAT(convert_tz(now(), @@session.time_zone,'+07:00'),'%a')

         ,' '

         ,(convert_tz(now(), @@session.time_zone,'+07:00'))

         )AS time;

2. Please select ‘NO’ in the SQLParse selection, else might get an error if ‘YES’ is selected.


3. Replace the new dataset created by just drag and drop to the cell of =NOW()


4. User now should be able to view the report with the correct timezone.


Investigation:

Inform user that they can proceed to change the timezone for the root.
Files