How to change Redash query from UTC to PST

When I ran the following query using Amazon Aurora RDS as source my timestamps com in UTC.

SET timezone = ‘America/Los_Angeles’;
select current_date,current_timestamp,max(created_at)
from my_table

How would I change that to local time or other timezone? Thanks,

It’s on our radar to add organization level configuration for timezones. For now, here’s what Redash does:

re:dash expects timestamps with either timezone data, or it assumes the data is UTC.

To work around this, you need to make RDS return the timezone data with its timestamps…

@susodapop Thanks. Are you suggesting to set time zone in RDS? Or did I misunderstood?

I don’t think you need to change anything about how RDS treats the dates internally. You just need to write your query so that the TZ info is returned with the timestamps.

If your timestamp comes through as 2020-01-28T20:09:00 Redash assumes it’s UTC and displays it unchanged.

If your timestamp comes through as 2020-01-28T20:09:00-0800 then Redash knows it’s offset by UTC-8. Redash converts it to UTC for display in Redash’s UI.

For example, when it was 8:09PM on January 28th in California it was 4:09AM UTC. So if you run this SQL:

SELECT '2020-01-28T20:09:00-0800' "time"

Redash will display it in UTC:


The only part of this that changes when organization-level timezones arrive is that Redash won’t convert all timestamps to UTC. You’ll be able to select which UTC offset it uses. Make sense?