From RAD Studio API Documentation
Jump to: navigation, search



TXSDateTime = class(TXSCustomDateTime)


class PASCALIMPLEMENTATION TXSDateTime : public TXSCustomDateTime


Type Visibility Source Unit Parent
class public
Soap.XSBuiltIns Soap.XSBuiltIns


TXSDateTime implements the XML schema datetime type so that it can be used on invokable interfaces.

TXSDateTime acts as a wrapper for the simple scalar type datetime 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. TXSDateTime enables this marshaling because it is a descendant of TRemotable.

To convert a TXSDateTime value to a TDateTime value, use the AsDateTime property. The resulting value represents the time portion 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 TXSDateTime 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 TXSDateTime 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 TXSDateTime instances that it passes as input parameters, and for freeing any TXSDateTime instances it creates or that are returned as output parameters or method results.

See Also