Add Method (DeviceTimeZones collection)

See Also     Example     Applies To    


The Add method adds a new relationship between a device name and a PITimeZoneInfo object to the DeviceTimeZones collection.


object.Add DeviceName, ZoneID

The Add method syntax has these parts:

Part Description
object An object expression that evaluates to a DeviceTimeZones object.
DeviceName An identifying string for a server or device that generates times. See Settings below for allowable characters.
ZoneID The ZoneRulesName or ZoneID to associate with this device.


The PITimeZoneInfo must exist in the local PITimeZoneInfos collection. Adding a mapping between a device name and a PITimeZoneInfo ZoneID prevents removal of the PITimeZoneInfo.  There may be multiple Device Zones mapped to a single PITimeZoneInfo object though the DeviceName must be unique.


Setting Description
DeviceName The following characters are not permitted in the DeviceName argument which uniquely identifies a particular device time zone within the collection.

 * ? " \  

A DeviceName may not be blank.


Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error Description
tseNOEMPTYSTRINGS The device name or ZoneID cannot be blank.
tseDUPLICATENAME The device name already exists. Delete the old name before adding it again.
tseNAMENOTFOUND The time zone was not found.
tseREGERROR An error occured writing to the registry.
Enabling Operational Intelligence