RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXSTime Class

TXSTime implements the XML schema time type so that it can be used on invokable interfaces.

Pascal
TXSTime = class(TRemotableXS);
C++
class TXSTime : public TRemotableXS;

TXSTime acts as a wrapper for the simple scalar type time that W3C defines for XML schemas. Because this type does not correspond directly to a Delphi or C++ type, it requires special marshaling when used in an invokable interface. TXSTime enables this marshaling because it is a descendant of TRemotable

To convert a TXSTime value to a TDateTime value, use the AsTime property. Other properties give the Hour, Minute, Second, and Millisecond that make up that value. These properties represent the time using Coordinated Universal Time (UTC). To convert that to a local time zone, adjust the hour and minute portions using the HourOffset and MinuteOffset properties. 

On server applications, instances of TXSTime that are input parameters on an invokable interface are automatically created when the method call is unmarshaled and automatically freed after any output parameters or return value are marshaled so that they can be sent to the client. When a TXSTime instance is created in a method that was called remotely using an invokable interface, the instance is automatically freed after the value of the TRemotable descendant is marshaled for transport back to the client application. 

The caller of an invokable interface (client) is responsible for creating any TXSTime instances that it passes as input parameters, and for freeing any TXSTime instances it creates or that are returned as output parameters or method results. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!