1 // Copyright © 2015-2017 winapi-rs developers
2 // Licensed under the Apache License, Version 2.0
3 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
4 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
5 // All files in the project carrying such notice may not be copied, modified, or distributed
6 // except according to those terms.
7 //! ApiSet Contract for api-ms-win-core-timezone-l1
8 use shared
::minwindef
::{BOOL, DWORD, FILETIME, LPDWORD, LPFILETIME, USHORT}
;
9 use um
::minwinbase
::{LPSYSTEMTIME, SYSTEMTIME}
;
10 use um
::winnt
::{BOOLEAN, LONG, WCHAR}
;
11 pub const TIME_ZONE_ID_INVALID
: DWORD
= 0xFFFFFFFF;
12 STRUCT
!{struct TIME_ZONE_INFORMATION
{
14 StandardName
: [WCHAR
; 32],
15 StandardDate
: SYSTEMTIME
,
17 DaylightName
: [WCHAR
; 32],
18 DaylightDate
: SYSTEMTIME
,
21 pub type PTIME_ZONE_INFORMATION
= *mut TIME_ZONE_INFORMATION
;
22 pub type LPTIME_ZONE_INFORMATION
= *mut TIME_ZONE_INFORMATION
;
23 STRUCT
!{struct DYNAMIC_TIME_ZONE_INFORMATION
{
25 StandardName
: [WCHAR
; 32],
26 StandardDate
: SYSTEMTIME
,
28 DaylightName
: [WCHAR
; 32],
29 DaylightDate
: SYSTEMTIME
,
31 TimeZoneKeyName
: [WCHAR
; 128],
32 DynamicDaylightTimeDisabled
: BOOLEAN
,
34 pub type PDYNAMIC_TIME_ZONE_INFORMATION
= *mut DYNAMIC_TIME_ZONE_INFORMATION
;
36 pub fn SystemTimeToTzSpecificLocalTime(
37 lpTimeZoneInformation
: *const TIME_ZONE_INFORMATION
,
38 lpUniversalTime
: *const SYSTEMTIME
,
39 lpLocalTime
: LPSYSTEMTIME
,
41 pub fn TzSpecificLocalTimeToSystemTime(
42 lpTimeZoneInformation
: *const TIME_ZONE_INFORMATION
,
43 lpLocalTime
: *const SYSTEMTIME
,
44 lpUniversalTime
: LPSYSTEMTIME
,
46 pub fn FileTimeToSystemTime(
47 lpFileTime
: *const FILETIME
,
48 lpSystemTime
: LPSYSTEMTIME
,
50 pub fn SystemTimeToFileTime(
51 lpSystemTime
: *const SYSTEMTIME
,
52 lpFileTime
: LPFILETIME
,
54 pub fn GetTimeZoneInformation(
55 lpTimeZoneInformation
: LPTIME_ZONE_INFORMATION
,
57 pub fn SetTimeZoneInformation(
58 lpTimeZoneInformation
: *const TIME_ZONE_INFORMATION
,
60 pub fn SetDynamicTimeZoneInformation(
61 lpTimeZoneInformation
: *const DYNAMIC_TIME_ZONE_INFORMATION
,
63 pub fn GetDynamicTimeZoneInformation(
64 pTimeZoneInformation
: PDYNAMIC_TIME_ZONE_INFORMATION
,
66 pub fn GetTimeZoneInformationForYear(
68 pdtzi
: PDYNAMIC_TIME_ZONE_INFORMATION
,
69 ptzi
: LPTIME_ZONE_INFORMATION
,
71 pub fn EnumDynamicTimeZoneInformation(
73 lpTimeZoneInformation
: PDYNAMIC_TIME_ZONE_INFORMATION
,
75 pub fn GetDynamicTimeZoneInformationEffectiveYears(
76 lpTimeZoneInformation
: PDYNAMIC_TIME_ZONE_INFORMATION
,
80 pub fn SystemTimeToTzSpecificLocalTimeEx(
81 lpTimeZoneInformation
: *const DYNAMIC_TIME_ZONE_INFORMATION
,
82 lpUniversalTime
: *const SYSTEMTIME
,
83 lpLocalTime
: LPSYSTEMTIME
,
85 pub fn TzSpecificLocalTimeToSystemTimeEx(
86 lpTimeZoneInformation
: *const DYNAMIC_TIME_ZONE_INFORMATION
,
87 lpLocalTime
: *const SYSTEMTIME
,
88 lpUniversalTime
: LPSYSTEMTIME
,