List & Label .NET
combit.Reporting Namespace / TimeZoneInformation Class / Database Property


In This Topic
    Database Property (TimeZoneInformation)
    In This Topic

    This determines the time zone to be used for all conversions of date and time values from the database/dataprovider to the client's time zone (see also TimeZoneInformation.Client). This is particularly important for distributed applications such as server/client applications or web applications, where data sources, applications and clients may be located on different systems in different time zones.

    Syntax
    'Declaration
     
    
    Public Property Database As TimeZoneInfo
    public TimeZoneInfo Database {get; set;}
    public:
    property TimeZoneInfo^ Database {
       TimeZoneInfo^ get();
       void set (    TimeZoneInfo^ value);
    }
    Remarks

    The values for the possible time zones can be determined in the Windows registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones or with the help of System.TimeZoneInfo.GetSystemTimeZones();.

     

    Note: Values from the Internet Assigned Numbers Authority (IANA) are not supported; only values/IDs from Microsoft Windows time zones are supported.

    Example
    ...
    // get all system time zones from current machine/process
    ReadOnlyCollection<System.TimeZoneInfo> timeZones = TimeZoneInfo.GetSystemTimeZones();
    
    //...
    
    // find explicit time zone and define as database time zone for reporting
    LL.TimeZoneInformation.Database = TimeZoneInfo.FindSystemTimeZoneById("W. Europe Standard Time");
    ...
    
    Requirements

    Platforms: Windows 10 (Version 21H2 - 22H2), Windows 11 (22H2 - 25H2), Windows Server 2016 - 2025
    .NET: .NET Framework 4.8, .NET 8, .NET 9, .NET 10

    See Also