xref: /reactos/sdk/lib/tzlib/tzlib.h (revision 11345aed)
1 /*
2  * PROJECT:     ReactOS TimeZone Utilities Library
3  * LICENSE:     GPL-2.0 (https://spdx.org/licenses/GPL-2.0)
4  * PURPOSE:     Provides time-zone utility wrappers around Win32 functions,
5  *              that are used by different ReactOS modules such as
6  *              timedate.cpl, syssetup.dll.
7  * COPYRIGHT:   Copyright 2004-2005 Eric Kohl
8  *              Copyright 2016 Carlo Bramini
9  *              Copyright 2020 Hermes Belusca-Maito
10  */
11 
12 #pragma once
13 
14 typedef struct _REG_TZI_FORMAT
15 {
16     LONG Bias;
17     LONG StandardBias;
18     LONG DaylightBias;
19     SYSTEMTIME StandardDate;
20     SYSTEMTIME DaylightDate;
21 } REG_TZI_FORMAT, *PREG_TZI_FORMAT;
22 
23 typedef LONG
24 (*PENUM_TIMEZONE_CALLBACK)(
25     IN HKEY hZoneKey,
26     IN PVOID Context OPTIONAL);
27 
28 BOOL
29 GetTimeZoneListIndex(
30     IN OUT PULONG pIndex);
31 
32 LONG
33 QueryTimeZoneData(
34     IN HKEY hZoneKey,
35     OUT PULONG Index OPTIONAL,
36     OUT PREG_TZI_FORMAT TimeZoneInfo,
37     OUT PWCHAR Description OPTIONAL,
38     IN OUT PULONG DescriptionSize OPTIONAL,
39     OUT PWCHAR StandardName OPTIONAL,
40     IN OUT PULONG StandardNameSize OPTIONAL,
41     OUT PWCHAR DaylightName OPTIONAL,
42     IN OUT PULONG DaylightNameSize OPTIONAL);
43 
44 VOID
45 EnumerateTimeZoneList(
46     IN PENUM_TIMEZONE_CALLBACK Callback,
47     IN PVOID Context OPTIONAL);
48 
49 // Returns TRUE if AutoDaylight is ON.
50 // Returns FALSE if AutoDaylight is OFF.
51 BOOL
52 GetAutoDaylight(VOID);
53 
54 VOID
55 SetAutoDaylight(
56     IN BOOL EnableAutoDaylightTime);
57