Hello, dears.

I’m using influxdb as my database. When I query data from influxdb cli client with command such as "select * from my_data tz(‘Asia/Shanghai’) ", the time field in returning data will be local time format.

But when I do it in redash, it won’t work. The time field in returning is still UTC time.

How could I solve this problem? Thank you very much.

Related:

and

thank you very much for your kindly reply.

But I still do not know how to get local time in redash.

As far as I know, it seems that either 2020-05-19T03:20:00Z or 2020-05-19T11:20:00+08:00 return by influxdb, redash frontend page always transforms it into UTC time even?

I want to know how could I get time like 2020-05-19T11:20:00+08:00 in redash.

Thank you very much.

Redash doesn’t know about your local time. If a datetime comes from your database without TZ info it is assumed to be UTC. If a datetime comes from your database and includes TZ info, Redash will display it in UTC.

To display your local time in Redash you need to augment your query to return properly shifted datetime objects that do not include a TZ offset. If they include the offset Redash will shift them to UTC.

Got it

Thanks for your reply.