Setting Snowflake Session Timezone

Answered

There is a large thread about setting the default user timezone for postgres/Redshift that was working fine for Snowflake previously but appears to have changed, possibly when the official snowflake driver was released?

Currently in my custom VM options I have:

-Duser.timezone=UTC

When running: select current_timestamp() it is returning: 2019-06-20 10:34:57.636000000 -07:00

Each time I login currently I have to run alter session set timezone='UTC', is there any way to set that by default?

2 comments
Comment actions Permalink

@Scott Vickers,

It looks like JDBC driver issue. Could you try the latest Snowflake JDBC driver?

As a workaround you can set up startup script for your data source/driver:

0
Comment actions Permalink

Snowflake defaults their client connections to use Pacific time. I recommend somebody at your company with Account Admin privileges should update this at the account level so that all clients have a default time zone of UTC.

Snowflake documentation talks about it here: https://docs.snowflake.net/manuals/sql-reference/sql/alter-account.html

This one hit me by surprise when I assumed that my AWS EC2 clients were getting UTC but were seeing PST instead.

0

Please sign in to leave a comment.