You can get or set the time zone value in a Java table operator.
To get the time zone value, do the following:
- Call getTime() or getTimestamp() and check that the return type is TeradataTime or TeradataTimestamp.
- If the return type is TeradataTime or TeradataTimestamp, call getTimeZone() on the object to get the time zone.
To set the time zone value, do the following:
- Create a TeradataTime or TeradataTimestamp object.
- Call setTimeZone() on the TeradataTime or TeradataTimestamp object, and pass the result to updateTime () or updateTimestamp() as the second parameter.
TeradataTime and TeradataTimestamp are used to get and set the time zone in Time with Time Zone and Timestamp with Time Zone values in the input or output rows. They are used only with Java table operators. For information about using Time with Time Zone and Timestamp with Time Zone as parameter and return types in a Java table operator, see SQL to Java Data Type Mapping.