Official Content

Returns the current difference, in minutes, between CTZ and UTC.

Syntax

&varCurrentOffset = DateTime.CurrentOffset()

Type Returned:
 Numeric
     Is the difference in minutes between CTZ and UTC.

Scope

Generators: .NET.NET Framework, Java, Ruby (up to GeneXus X Evolution 3)

Description

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.

Samples

&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.

See Also

Enabling TimeZone Support
DateTime storage timezone property
GetTimeZone method
SetTimeZone method
FromTimeZone method

{{{Category:GeneXus 15 Help}} {{{40540}}}


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant