| title | CURRENT_TIMEZONE (Transact-SQL) | Microsoft Docs | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||
| ms.date | 10/10/2019 | |||||||||
| ms.prod | sql | |||||||||
| ms.prod_service | database-engine, sql-database, sql-data-warehouse, pdw | |||||||||
| ms.reviewer | ||||||||||
| ms.technology | t-sql | |||||||||
| ms.topic | language-reference | |||||||||
| f1_keywords |
|
|||||||||
| dev_langs |
|
|||||||||
| helpviewer_keywords |
|
|||||||||
| author | MladjoA | |||||||||
| ms.author | mlandzic |
[!INCLUDEtsql-appliesto-xxxxxx-asdb-xxxx-xxx-md]
This function returns the name of the time zone observed by a server or an instance. For SQL Database Managed Instance, return value is based on the time zone of the instance itself assigned during instance creation, not the time zone of the underlying operating system.
Note
For single and pooled SQL Databases time zone is always set to UTC and CURRENT_TIMEZONE returns the name of the UTC time zone.
CURRENT_TIMEZONE ( ) This function takes no arguments.
varchar
CURRENT_TIMEZONE is a non-deterministic function. Views and expressions that reference this column cannot be indexed.
Note that the value returned will reflect the actual time zone and language settings of the server or the instance.
SELECT CURRENT_TIMEZONE();
/* Returned:
(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
*/