time_zone_string - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

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.

Example: Setting the Time Zone Using a Time Zone String

This example sets the session default time zone displacement by specifying a simple constant time zone string expression. Vantage then passes the string to a system-defined UDF that interprets it and sets the default time zone displacement for the session based on the value of the string.

SET TIME ZONE 'America Eastern';

If the value of the time_zone_string you specify is not valid, the request aborts and Vantage returns the following error to the requestor.

*** Failure 7455 Invalid Time Zone specified.