keiryliza : It works good, change all queries getdate() to dbo.dReturnDate(getdate()) dependy of your local time.
This sound like really bad idea! Using scalar function can reduce performance dramatically in many cases.
Instead simply use the inline code:
select CONVERT(datetime, CONVERT(datetimeoffset, getdate()) AT TIME ZONE 'Israel Standard Time')
NagaPakalapati : If there is an absolute need to change the timezone, there is a workaround mentioned in the docs.
You confuse two different services. The post is about Azure SQL Database and you speak about Azure Managed Instance 🙂
Jose_Manuel_Jurado : the default time zone on Azure SQL DB is UTC
Coordinated Universal Time (UTC) is a time standard and NOT a time zone, Greenwich Mean Time (GMT) is a time zone. This entire discussion and many of the documentations and the terms used by Microsoft should be speaking about GMT time zone and NOT about UTC.