Official Content

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


&varCurrentOffset = DateTime.CurrentOffset()

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


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


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.


&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: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant