편집

다음을 통해 공유


SessionSettings.TimeZone([Text]) Method

Version: Available or changed with runtime version 1.0.

Gets or sets the time zone property in a SessionSettings object.

Syntax

[TimeZone := ]  SessionSettings.TimeZone([NewTimeZone: Text])

Note

This method can be invoked using property access syntax.

Parameters

SessionSettings
 Type: SessionSettings
An instance of the SessionSettings data type.

[Optional] NewTimeZone
 Type: Text
Specifies the time zone property in the SessionsSettings object. The value must be a valid Windows time zone name, such as UTC or Pacific Standard Time.

Return Value

[Optional] TimeZone
 Type: Text
The time zone set in the SessionSettings object.

Remarks

The default time zone is UTC. This method can also be used with web service sessions.

Example

This example creates a SessionSettings object that is populated with the current client user's personalization data, and then uses the TimeZone method to set the time zone to 'UTC' (Coordinated Universal Time). Finally, the RequestSessionUpdate method sends a request to the client to abandon the current session and start a new session that uses the new profile ID. This example requires a SessionSettings data type variable.

var
  MySessionSettings : SessionSettings;
begin
  MySessionSettings.Init;
  MySessionSettings.TimeZone('UTC');
  MySessionSettings.RequestSessionUpdate(false);
end;  

SessionSettings Data Type
Get Started with AL
Developing Extensions
Managing Time Zones with Web Services