When you query a timestamp data from your database like PostgreSQL, sometimes you want to get it with specific timezone other than timezone on your local machine that Exploratory Desktop is running.

For example, if timezone setting on your local machine is America/Los_Angeles, a query like below returns the result in America/Los_Angeles timezone for timestamp data type column like original column.

You can expliclity set timezone by editing your query with AT TIME ZONE but this messes up your SQL query.

To address this issue, you can set project level timezone with R Script that can be created inside project. And here is how.

Create R Script to set Timezone

On your left-handside tree, click Plus utton next to Scripts.

And defined script like below and click “Save” button.

Sys.setenv(TZ="UTC")

Now when you run the same query you’ll get this.

Now original column value is same as t3, which is “UTC” timezone enforced.