CurrentOffset method

Official Content

It returns the current difference –in minutes– between CTZ and UTC.

Syntax

&VarCurrentOffset = DateTime.CurrentOffset()

This is a static function of DateTime data type. Note that ‘DateTime’ is neither a variable nor an attribute; it’s the name of the DateTime data type to which the method is applied.

Type Returned

Numeric: Difference in minutes between CTZ and UTC.

Example

&VarCurrentOffset = DateTime.CurrentOffset()

If the application is run from a browser or a device in Uruguay, the variable &VarCurrentOffset will be loaded with -180; this is the difference in minutes between Uruguay and UTC when Daylight Savings Time is not in effect. If the application was run when Daylight Savings Time was used, the result would be -120.

Scope

Data types DateTime
Languages .NET, Java, Ruby
   

See also

Enabling TimeZone Support
Date Time storage timezone property
GetTimeZone method
SetTimeZone method
FromTimeZone method





Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.