Σημείωμα
Η πρόσβαση σε αυτήν τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να εισέλθετε ή να αλλάξετε καταλόγους.
Η πρόσβαση σε αυτήν τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να αλλάξετε καταλόγους.
Applies to:
SQL Server 2022 (16.x) and later versions
Azure SQL Database
Azure SQL Managed Instance
SQL database in Microsoft Fabric
The CURRENT_TIMEZONE Transact-SQL (T-SQL) function returns the name of the time zone observed by a server or an instance. For SQL Managed Instance, the function returns the time zone of the instance itself assigned during instance creation, not the time zone of the underlying operating system.
Note
Azure SQL Database and SQL database in Microsoft Fabric support changing the default time zone from universal coordinated time (UTC). If you modify the time zone at the database or session level, this function returns local time based on the configured time zone value. For more information, see ALTER DATABASE SCOPED CONFIGURATION and SET TIME ZONE.
See Date and time data types and functions for an overview of all the Transact-SQL date and time data types and functions.
Transact-SQL syntax conventions
Syntax
CURRENT_TIMEZONE ( )
Arguments
This function takes no arguments.
Return types
varchar
Remarks
CURRENT_TIMEZONE is a non-deterministic function. You can't index views and expressions that reference this column.
Examples
The value returned reflects the actual time zone and language settings of the server or the instance.
SELECT CURRENT_TIMEZONE();
The result returns (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna.