Example: CURRENT_TIMESTAMP and the TimeDateWZControl Flag

Teradata Vantage™ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

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 the Teradata 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.

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