diff --git a/Cargo.toml b/Cargo.toml index d5a63339..79bc50d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,7 +52,7 @@ js-sys = { version = "0.3", optional = true } # contains FFI bindings for windows-link = { version = "0.1", optional = true } [target.'cfg(windows)'.dev-dependencies] -windows-bindgen = { version = "0.60" } # MSRV is 1.74 +windows-bindgen = { version = "0.61" } # MSRV is 1.74 [target.'cfg(unix)'.dependencies] iana-time-zone = { version = "0.1.45", optional = true, features = ["fallback"] } diff --git a/src/offset/local/win_bindings.rs b/src/offset/local/win_bindings.rs index b8e6b6d2..cb563b4e 100644 --- a/src/offset/local/win_bindings.rs +++ b/src/offset/local/win_bindings.rs @@ -18,14 +18,19 @@ pub struct DYNAMIC_TIME_ZONE_INFORMATION { pub TimeZoneKeyName: [u16; 128], pub DynamicDaylightTimeDisabled: bool, } +impl Default for DYNAMIC_TIME_ZONE_INFORMATION { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} #[repr(C)] -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Default)] pub struct FILETIME { pub dwLowDateTime: u32, pub dwHighDateTime: u32, } #[repr(C)] -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Default)] pub struct SYSTEMTIME { pub wYear: u16, pub wMonth: u16, @@ -47,3 +52,8 @@ pub struct TIME_ZONE_INFORMATION { pub DaylightDate: SYSTEMTIME, pub DaylightBias: i32, } +impl Default for TIME_ZONE_INFORMATION { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +}