Example: CURRENT_TIMESTAMP and the TimeDateWZControl Flag - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

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

This example shows the effect of the DBS Control flag TimeDateWZControl on the results returned by CURRENT_TIMESTAMP when the function is specified without an AT clause or with an AT LOCAL clause.

Assume the following:

  • The time local to Vantage 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.

If the TimeDateWZControl flag is enabled:

For User TK, the CURRENT_TIMESTAMP function returns:

   2010-02-01 10:59:00.000000+09:00

For User LA, the CURRENT_TIMESTAMP function returns:

   2010-01-31 16:59:00.000000-08:00


If the TimeDateWZControl flag 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