SET TIME ZONE Syntax Elements - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™
LOCAL
Time zone offset for the session as the system default.
USER
Time zone offset for the session as the defined user default. See CREATE USER.
If a default is not defined for the user, the value for the time zone offset is changed to the system default.
expression
Value of the default time zone for the session to the displacement specified by the numeric value of expression in units of hours.
Vantage implicitly converts the expression, as needed and if allowed, to a time zone displacement, where expression represents a simple constant numeric expression.
For a list of the implicit data type conversions Vantage performs on numeric expression data types, see “SET TIME ZONE” in Teradata Vantage™ - SQL Data Definition Language Detailed Topics , B035-1184 .
sign
Plus (+) sign to indicate positive offset or minus (-) sign to indicate negative offset.
quotestring
Value of the default time zone for the session to the displacement specified by the signed value of quotestring as an ‘hh’ hours or ‘hh:mm’ hours-to-minute interval value.
For a complete list of the implicit data type conversions Vantage performs on ‘quotestring ’ values, see “SET TIME ZONE” in Teradata Vantage™ - SQL Data Definition Language Detailed Topics , B035-1184 .
time_zone_string
Sets the value of the default time zone for the session to the displacement specified by ‘time_zone_string’.
If you specify an explicit non-GMT time zone string, it is passed to a system-defined UDF named GetTimeZoneDisplacement that interprets the string and determines the appropriate time zone displacement for the session (see Teradata Vantage™ - SQL Date and Time Functions and Expressions, B035-1211 for information about this system-defined UDF). Time zone strings that are expressed in terms of GMT do not enable automatic adjustments for Daylight Saving Time.
To set system-wide time zone values, you must use the DBS Control parameters SystemTimeZoneHour and SystemTimeZoneMinute or see the tdlocaledef utility in Teradata Vantage™ - Database Utilities , B035-1102 .
See “SET TIME ZONE” in Teradata Vantage™ - SQL Data Definition Language Detailed Topics , B035-1184 for a complete list of the supported time zone strings.