cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the time zone in notebook ,

User16826994223
Databricks Employee
Databricks Employee

How to change the time zone in notebook ,

1 REPLY 1

User16826994223
Databricks Employee
Databricks Employee
  1.  import java.util.TimeZone

 spark.conf.set("spark.sql.session.timeZone", "Asia/Calcutta")

TimeZone.setDefault(TimeZone.getTimeZone("Asia/Calcutta"))

Scala

import java.time

val s: String = time.LocalDateTime.now().toString

println(s)

sql 

%sql

select current_timestamp

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now