Microsoft has opened a public preview of local time-zone support in Azure SQL Database. Developers can set a persistent time zone for each database or override it for an individual connection, according to Microsoft's September 28 announcement.
The database setting uses TIME_ZONE, while SET TIME ZONE controls the current session. Functions including GETDATE(), CURRENT_TIMESTAMP and SYSDATETIME() then return current values in the effective local time zone. UTC remains the default when neither setting overrides it. This can simplify migrations from SQL Server applications that expect local time and serve customers in different regions.
The setting does not convert timestamps already stored in tables. Explicit conversions still use AT TIME ZONE, and datetime or datetime2 columns still do not store a time-zone offset.
Microsoft identifies a preview issue worth testing before deployment: generated scripts can omit quotation marks around time-zone values, causing syntax errors. The problem also affects BACPAC imports and DACPAC deployments that contain the database-scoped setting. See the T-SQL documentation for session syntax and scope.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.