|0||Disabled. The values returned by the built-in time and date functions reflect the time value local to the database server, but the time zone value that is defined for user or session. This is identical to a setting of 1.|
|1||Disabled. The values returned by the built-in time and date functions reflect the time value local to the database server, but the time zone value that is defined for user or session. This is identical to a setting of 0.|
|2||Enabled. The values returned by the built-in time and date functions reflect the session time and session time zone. DateTime values are stored in the database as UTC.|
|3||Enabled. The values returned by the built-in time and date functions reflect the session time and session time zone. DateTime values without zone information are stored in the database as system local time.
System local time offset is defined either using an SDF file and the tdlocaledef utility, or using the System TimeZone Hour and System TimeZone Minute DBS Control settings.
- new Teradata systems.
- systems that have been upgraded or re-initialized (sysinited) from prior database releases in which TimeDateWZControl had been 0 and System TimeZone Hour or System TimeZone Minute had been non-zero.
Changes Take Effect
After the DBS Control Record has been written.
TimeDateWZControl must be enabled to use temporal tables. For more information on temporal tables, see Teradata Vantage™ - ANSI Temporal Table Support, B035-1186 and Teradata Vantage™ - Temporal Table Support, B035-1182.
- TIME ZONE parameter of the CREATE USER statement
Sets the default time zone displacement from UTC used for sessions opened by the user.
- SET TIME ZONE statement
Sets the time zone displacement from UTC for the current session. Overrides the time zone defined for the current user.
If no session time zone is defined in either of these ways, the session time zone defaults to the database system time zone, as defined by the DBS Control fields System TimeZone Hour and System TimeZone Minute.
Examples: Using the TimeDateWZControl field of DBS Control
- The time local to the database server is 11:59:00 Coordinated Universal Time (UTC), January 31, 2010.
- User TK lives in Tokyo, and has a time zone defined as +9 hours offset from UTC.
- User LA lives in Los Angeles, and has a time zone defined as -8 hours offset from UTC.
- User TK and User LA run the CURRENT_TIMESTAMP function at exactly the same time.
When this field is enabled:
For User TK, the CURRENT_TIMESTAMP function returns:2010-02-01 20:59:00.000000+09:00
For User LA, the CURRENT_TIMESTAMP function returns:2010-01-31 03:59:00.000000-08:00
When this field is disabled:
For User TK, the CURRENT_TIMESTAMP function returns:2010-01-31 11:59:00.000000+09:00
For User LA, the CURRENT_TIMESTAMP function returns:2010-01-31 11:59:00.000000-08:00
CURRENT_TIME and CURRENT_DATE functions display analogous behavior.
|For more information on…||See…|
|Teradata built-in time and date functions||Teradata Vantage™ - SQL Date and Time Functions and Expressions, B035-1211.|
|Setting session time zones||Information about SET TIME ZONE, CREATE USER, and MODIFY USER in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.|
|DateTime, Interval, and Period data types||Teradata Vantage™ - Data Types and Literals, B035-1143.|
|System TimeZone fields||System TimeZone Hour and System TimeZone Minute.|
|Temporal tables||Teradata Vantage™ - Temporal Table Support, B035-1182.|