CURRENT_TIMESTAMP and CURRENT_TIME return different time

Hi,
I run CURRENT_TIMESTAMP and CURRENT_TIME return different time.
How to set the global timezone of dremio ?

env:
dremio 3.1 OSS in docker

dremio-env with timezone set :

DREMIO_JAVA_EXTRA_OPTS="-Duser.timezone=Asia/Shanghai -Dsaffron.default.charset=UTF-16LE"

DREMIO_JAVA_CLIENT_EXTRA_OPTS="-Duser.timezone=Asia/Shanghai -Dsaffron.default.charset=UTF-16LE"

DREMIO_JAVA_SERVER_EXTRA_OPTS="-Duser.timezone=Asia/Shanghai -Dsaffron.default.charset=UTF-16LE"

1 Like

Hi @Jue_Lin_Zhuang_Jack

Dremio normalizes to UTC. CURRENT_TIMESTAMP returns always in UTC
CURRENT_DATE and CURRENT_TIME returns in local or in your case it Shanghai time (whatever set via dremio-env)

Note: I have put in a request to update the documentation

Thanks
@balaji.ramaswamy

Thanks very much !!!