The datetimeoffset value in the target time zone. A list of installed time zones is also exposed through the sys.time_zone_info (Transact-SQL) view.įor more information about time zones for SQL Server on Linux, see Configure the time zone for SQL Server 2022 on Linux. Time zones installed on the computer are stored in the following registry hive: KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. SQL Server relies on time zones that are stored in the Windows Registry. Transact-SQL syntax conventions Syntax inputdate AT TIME ZONE timezoneĪn expression that can be resolved to a smalldatetime, datetime, datetime2, or datetimeoffset value. If inputdate is provided as a datetimeoffset value, then AT TIME ZONE clause converts it into the target time zone using the time zone conversion rules.ĪT TIME ZONE implementation relies on a Windows mechanism to convert datetime values across time zones. When inputdate is provided without offset information, the function applies the offset of the time zone assuming that inputdate is in the target time zone.
![arizona time zone map arizona time zone map](https://www.maps-of-the-usa.com/maps/usa/large-detailed-time-zones-map-of-the-united-states.jpg)
SQL Server 2016 (13.x) and later Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics SQL analytics endpoint in Microsoft Fabric Warehouse in Microsoft FabricĬonverts an inputdate to the corresponding datetimeoffset value in the target time zone.