TimeZone (OraTimeStampTZ) Property

Description

Returns or sets the time zone information of an OraTimeStampTZ object.

Usage

timezone = OraTimeStampTZObj.TimeZoneOraTimeStampTZObj.TimeZone= timezone

Arguments

Arguments Description
[in] timezone The time zone attribute of an OraTimeStampTZ object.

Data Type

String

Remarks

Setting the TimeZone property does not change the Coordinated Universal Time (UTC) datetime values stored in the OraTimeStampTZ object. However, the local datetime values in the specified time zone can change.

The following table shows the UTC datetime values that correspond to the datetime and time zone values of the OraTimeStampTZ object in the example.

Properties OraTSTZ Object Values UTC Date Time Values of the OraTSTZ Object
Year 2003 2003
Month 4 4
Day 29 29
Hour 12 19
Minute, Second, Nanosecond 0 0
TimeZone -07:00 00:00

Setting the TimeZone property to -08:00 changes the datetime values in the specified time zone of the OraTimeStampTZ object, but does not change the UTC datetime values.

Properties New OraTSTZ Object Values UTC Date Time Values of the New OraTSTZ Object
Year 2003 2003
Month 4 4
Day 29 29
Hour 11 19
Minute, Second, Nanosecond 0 0
TimeZone -08:00 00:00

Examples

Dim OraTSTZ as OraTimeStampTZ 
Dim OraTSTZ_new as OraTimeStampTZ 
Dim OraTSTZStr as String 
Dim OraTSTZStr_new as String 
Set OraTSTZ = oo4oSession.CreateOraTimeStampTZ( "2003-APR-29" & _
       "12:00:00 -07:00", "YYYY-MON-DD HH:MI:SS TZH:TZM")
 
'Change Time Zone to "-08:00" 
Set OraTSTZ_new = OraTSTZ.Clone 
oraTSTZ_new.TimeZone = "-08:00" 
 
'OraTSTZStr has value as (29-APR-03 12.00.00.000000000 PM -07:00) 
OraTSTZStr = OraTSTZ.value 
'OraTSTZStr_new has value as (29-APR-03 11.00.00.000000000 PM -08:00) 
OraTSTZStr_new = OraTSTZ_new.value