Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Latest commit

 

History

History
72 lines (54 loc) · 2.06 KB

File metadata and controls

72 lines (54 loc) · 2.06 KB
description CURRENT_TIMEZONE (Transact-SQL)
title CURRENT_TIMEZONE (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 05/28/2020
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
CURRENT_TIMEZONE
CURRENT_TIMEZONE_TSQL
dev_langs
TSQL
helpviewer_keywords
current time zone [SQL Server]
current timezone [SQL Server]
system time zone [SQL Server]
system timezone [SQL Server]
functions [SQL Server], time zone
functions [SQL Server], timezone
timezone [SQL Server], functions
time zone [SQL Server], functions
CURRENT_TIMEZONE function [SQL Server]
author MladjoA
ms.author mlandzic

CURRENT_TIMEZONE (Transact-SQL)

[!INCLUDEAzure SQL Database Azure SQL Managed Instance]

This function returns the name of the time zone observed by a server or an instance. For SQL 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 SQL Database, the time zone is always set to UTC and CURRENT_TIMEZONE returns the name of the UTC time zone.

Syntax

CURRENT_TIMEZONE ( )  

Arguments

This function takes no arguments.

Return Type

varchar

Remarks

CURRENT_TIMEZONE is a non-deterministic function. Views and expressions that reference this column cannot be indexed.

Example

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 
*/

See also

SQL Managed Instance Time Zone

CURRENT_TIMEZONE_ID()