Official Content

Obtains the Current TimeZone (CTZ).

Syntax

&TimeZone = DateTime.GetTimeZone()

Type Returned:
Timezone Domains

Note: The TimeZones domain doesn’t list all the possible Time Zone values. It may happen that the value returned by this method is not included in the domain.

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

Event 'GetTZ'
   &Timezones = DateTime.GetTimeZone()
   msg(&Timezones.EnumerationDescription())
Endevent

When this is run in a browser in Uruguay, the following message will be displayed:

America/Montevideo

See Also

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


   
   


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