Oracle® Objects for OLE Developer's Guide 10g Release 1 (10.1) Part Number B10118-01 |
|
Applies To
Description
Returns or sets the time zone information of an OraTimeStampTZ object.
Arguments |
Description |
---|---|
[in] timezone |
The time zone attribute of an OraTimeStampTZ object. |
timezone = OraTimeStampTZObj.TimeZone
OraTimeStampTZObj.TimeZone= timezone
Datatype
String
Remarks
Setting the TimeZone property does not change the UTC (Coordinated Universal Time--formerly Greenwich Mean Time) datetime values stored in the OraTimeStampTZ object. However, the local datetime values in the specified time zone can change.
Example
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
The following table shows the UTC datetime values that correspond to the datetime and timezone values of the OraTimeStampTZ object in the example.
Properties |
OraTSTZ object values |
UTC datetime 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 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 datetime 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 |