|
RDOTimezones collection
represents time zones as defined by the entries in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Time Zones registry key
Returned by:
RDOSession.Timezones
The example below prints out the
names of all time zones.
set Session =
CreateObject("Redemption.RDOSession")
set Timezones = Session.Timezones
for each TZ in Timezones
Debug.Print TZ.Name
next |
Properties
Methods
|
Derived from:
IDispatch
|
|
Properties |
|
Count |
integer, read-only. Returns
the number of time zones in the collection
|
See Item() method help below |
CurrentTimeZone |
RDOTimezone, read-only.
Returns the current time zone |
set Session =
CreateObject("Redemption.RDOSession")
MsgBox "The current Time Zone is" & vbCrLf &
Session.Timezones.CurrentTimezone.Name
|
_Item[Index] |
Returns an instance of the
RDOTimeZone object with the given Index.
Default property.
Index - Variant,
either an integer (1 through Count) or a string representing time zone
id or name.
|
See Item() method help below |
|
Methods |
|
ConvertTime(SourceDateTime,
SourceTimeZone, DestinationTimeZone) |
Converts date/time value from
one time zone to another time zone.
SourceDateTime - a
date/time value expressed in the original time zone
SourceTimeZone - The
original time zone (RDOTimeZone) of the
date/time value to be converted
TargetTimeZone - The
target time zone (RDOTimeZone) to which
the date/time value is to be converted.
|
set Session =
CreateObject("Redemption.RDOSession")
set Timezones = Session.Timezones
set TZ1 = Timezones("Eastern Standard Time")
set TZ2 = Timezones("Pacific Standard Time")
DT1 = #12/9/2006 9:00#
DT2 = Timezones.ConvertTime(DT1, TZ1, TZ2)
MsgBox DT1 & " in " & TZ1.ID & " is " & DT2 & " in " & TZ2.ID |
LocalTimeToUTC(Value) |
Converts a date-time value
from the local time zone to Coordinated Universal Time (UTC).
Value - date-time
|
set Session =
CreateObject("Redemption.RDOSession")
set Timezones = Session.Timezones
DT = Timezones.LocalTimeToUTC(Now)
MsgBox "It is now " & DT & " in the UTC time zone"
|
Item(Index) |
Returns an instance of the
RDOTimeZone object with the given Index.
Index - Variant,
either an integer (1 through Count) or a string representing time zone
id or name.
|
set Session =
CreateObject("Redemption.RDOSession")
set Timezones = Session.Timezones
for i = 1 to Timezones.Count
Debug.Print Timezones.Item(i).Name
next |
UTCToLocalTime(Value) |
Converts a date-time value
that is specified in the Coordinated Universal Time (UTC) format to the
value in the local time zone.
Value - date-time
|
|
|
|